Compare commits
No commits in common. "97021a1a6c11943f92885549c203b1724c40808e" and "1ebd68346e72cd45ca3c9a4782ab744e228598be" have entirely different histories.
97021a1a6c
...
1ebd68346e
18 changed files with 397 additions and 103 deletions
|
|
@ -1,18 +0,0 @@
|
||||||
# File: tests/shared/mocks/module_name/CMakeLists.txt
|
|
||||||
|
|
||||||
# TEST_RUNNER
|
|
||||||
add_library(module_name STATIC
|
|
||||||
module_name.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(module_name PUBLIC
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}
|
|
||||||
#Next comes the shared and non-module specific test depencencies.
|
|
||||||
#${CMAKE_SOURCE_DIR}/tests/shared/mocks/
|
|
||||||
#${CMAKE_SOURCE_DIR}/tests/shared/fakes/
|
|
||||||
#${CMAKE_SOURCE_DIR}/tests/shared/stubs/
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(module_name
|
|
||||||
${CPPUTEST_LIBRARIES}
|
|
||||||
)
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
#include "module_name.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
/**
|
|
||||||
* @brief Module description
|
|
||||||
* @details This file is an <Purpose here>
|
|
||||||
* @author Jake G
|
|
||||||
* @date todays_date
|
|
||||||
* @copyright None
|
|
||||||
* @file module_name.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
//#pragma once
|
|
||||||
#ifndef module_name
|
|
||||||
#define module_name
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
#endif //module_name
|
|
||||||
|
|
@ -1,35 +1,7 @@
|
||||||
# File: src/module_name/CMakeLists.txt
|
|
||||||
add_library(module_name STATIC
|
add_library(module_name STATIC
|
||||||
module_name.c
|
module_name.c
|
||||||
)
|
)
|
||||||
|
|
||||||
# Current list dir: The directory where the cmake config file is.
|
target_include_directories(module_name PUBLIC
|
||||||
# Source Dir: The dir where the root/main cmake config file is.
|
|
||||||
|
|
||||||
if(NOT UNIT_TESTING)
|
|
||||||
target_include_directories(module_name PUBLIC
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}
|
${CMAKE_CURRENT_LIST_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/inc/
|
)
|
||||||
)
|
|
||||||
target_link_libraries(module_name
|
|
||||||
RegEdit
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
target_include_directories(module_name PUBLIC
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}
|
|
||||||
#First we include any module specific test dependencies.
|
|
||||||
${CMAKE_SOURCE_DIR}/tests/module_name/mocks/
|
|
||||||
${CMAKE_SOURCE_DIR}/tests/module_name/fakes/
|
|
||||||
${CMAKE_SOURCE_DIR}/tests/module_name/stubs/
|
|
||||||
#Next comes the shared and non-module specific test depencencies.
|
|
||||||
${CMAKE_SOURCE_DIR}/tests/shared/mocks/
|
|
||||||
${CMAKE_SOURCE_DIR}/tests/shared/fakes/
|
|
||||||
${CMAKE_SOURCE_DIR}/tests/shared/stubs/
|
|
||||||
#Finally we include the local stuff, which has likely been overridden.
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
#Place Mocked/Regular dependencies here for unit testing.
|
|
||||||
target_link_libraries(module_name
|
|
||||||
MockRegEdit
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,14 @@
|
||||||
/**
|
/*
|
||||||
* @brief Module description
|
* Author: username
|
||||||
* @details This file is an <Purpose here>
|
* Date: todays_date
|
||||||
* @author Jake G
|
* filename: module_name.h
|
||||||
* @date todays_date
|
* description: module_purpose
|
||||||
* @copyright None
|
|
||||||
* @file module_name.h
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#pragma once
|
|
||||||
#ifndef module_name
|
#ifndef module_name
|
||||||
#define module_name
|
#define module_name
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
|
|
||||||
int add_two(int a);
|
int add_two(int a);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
#endif //module_name
|
#endif //module_name
|
||||||
|
|
|
||||||
0
mocks/.mocks_git_dir
Normal file
0
mocks/.mocks_git_dir
Normal file
6
mocks/CMakeLists.txt
Normal file
6
mocks/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
add_subdirectory(MockRegEdit)
|
||||||
|
add_subdirectory(MockADC)
|
||||||
|
add_subdirectory(TimerMock)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
7
mocks/MockADC/CMakeLists.txt
Normal file
7
mocks/MockADC/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
add_library(MockADC STATIC
|
||||||
|
MockADC.c
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(MockADC PUBLIC
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}
|
||||||
|
)
|
||||||
84
mocks/MockADC/MockADC.c
Normal file
84
mocks/MockADC/MockADC.c
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
/*
|
||||||
|
* Author: username
|
||||||
|
* Date: 2024
|
||||||
|
* filename: MockADC.c
|
||||||
|
* description: module_purpose
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "MockADC.h"
|
||||||
|
#include "CppUTestExt/MockSupport_c.h"
|
||||||
|
|
||||||
|
#define FAKESIZE 256
|
||||||
|
|
||||||
|
uint16_t fake_data[FAKESIZE];
|
||||||
|
int fake_index = 0;
|
||||||
|
|
||||||
|
static bool is_setup = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void ADC_SetPin(uint8_t pin_num)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ADC_Setup(void)
|
||||||
|
{
|
||||||
|
is_setup = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ADC_Init(uint8_t pin_num)
|
||||||
|
{
|
||||||
|
mock_c()->actualCall("ADC_Init")
|
||||||
|
->withUnsignedIntParameters("pin_num", pin_num);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ADC_Enable(void)
|
||||||
|
{
|
||||||
|
mock_c()->actualCall("ADC_Enable");
|
||||||
|
}
|
||||||
|
|
||||||
|
void ADC_Disable(void)
|
||||||
|
{
|
||||||
|
mock_c()->actualCall("ADC_Disable");
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t ADC_ReadValue_Impl(uint8_t pin_num)
|
||||||
|
{
|
||||||
|
mock_c()->actualCall("ADC_ReadValue_Impl")
|
||||||
|
->withUnsignedIntParameters("pin_num", pin_num);
|
||||||
|
|
||||||
|
if(fake_index == 0){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return fake_data[--fake_index];
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t (*ADC_ReadValue)(uint8_t pin_num) = ADC_ReadValue_Impl;
|
||||||
|
|
||||||
|
|
||||||
|
void MockADC_PushValue(uint16_t value){
|
||||||
|
if(fake_index >= FAKESIZE - 1){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fake_data[fake_index++] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MockADC_ZeroIndex(void)
|
||||||
|
{
|
||||||
|
fake_index = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int MockADC_GetIndex(void)
|
||||||
|
{
|
||||||
|
return fake_index;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool MockADC_IsSetup(void)
|
||||||
|
{
|
||||||
|
return is_setup;
|
||||||
|
}
|
||||||
30
mocks/MockADC/MockADC.h
Normal file
30
mocks/MockADC/MockADC.h
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
/**
|
||||||
|
* @brief PUT_TEXT_HERE
|
||||||
|
* @details This file is...
|
||||||
|
* @author username
|
||||||
|
* @date todays_date
|
||||||
|
* @copyright None
|
||||||
|
* @file MOCKADC.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MOCKADC_H
|
||||||
|
#define MOCKADC_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
|
||||||
|
void ADC_Setup(void);
|
||||||
|
void ADC_SetPin(uint8_t pin_num);
|
||||||
|
void ADC_Init(uint8_t pin_num);
|
||||||
|
void ADC_Enable(void);
|
||||||
|
void ADC_Disable(void);
|
||||||
|
|
||||||
|
extern uint16_t (*ADC_ReadValue)(uint8_t pin_num);
|
||||||
|
|
||||||
|
void MockADC_PushValue(uint16_t value);
|
||||||
|
void MockADC_ZeroIndex(void);
|
||||||
|
int MockADC_GetIndex(void);
|
||||||
|
bool MockADC_IsSetup(void);
|
||||||
|
|
||||||
|
#endif //MOCKADC_H
|
||||||
12
mocks/MockRegEdit/CMakeLists.txt
Normal file
12
mocks/MockRegEdit/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
add_library(MockRegEdit STATIC
|
||||||
|
MockRegEdit.c
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(MockRegEdit PUBLIC
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(MockRegEdit
|
||||||
|
${CPPUTEST_LIBRARIES}/libCppUTest.a
|
||||||
|
${CPPUTEST_LIBRARIES}/libCppUTestExt.a
|
||||||
|
)
|
||||||
85
mocks/MockRegEdit/MockRegEdit.c
Normal file
85
mocks/MockRegEdit/MockRegEdit.c
Normal file
|
|
@ -0,0 +1,85 @@
|
||||||
|
/*
|
||||||
|
* Author: username
|
||||||
|
* Date: 2024
|
||||||
|
* filename: MockRegEdit.c
|
||||||
|
* description: module_purpose
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "MockRegEdit.h"
|
||||||
|
#include "CppUTestExt/MockSupport_c.h"
|
||||||
|
|
||||||
|
|
||||||
|
void RegEdit_SetRegister(void *reg)
|
||||||
|
{
|
||||||
|
mock_c()->actualCall("RegEdit_SetRegister")
|
||||||
|
->withPointerParameters("reg", reg);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RegEdit_ClearRegister(void *reg)
|
||||||
|
{
|
||||||
|
mock_c()->actualCall("RegEdit_ClearRegister")
|
||||||
|
->withPointerParameters("reg", reg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RegEdit_SetBit(void *reg, uint8_t bit_num)
|
||||||
|
{
|
||||||
|
mock_c()->actualCall("RegEdit_SetBit")
|
||||||
|
->withPointerParameters("reg", reg)
|
||||||
|
->withUnsignedIntParameters("bit_num", bit_num);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RegEdit_ClearBit(void *reg, uint8_t bit_num)
|
||||||
|
{
|
||||||
|
mock_c()->actualCall("RegEdit_ClearBit")
|
||||||
|
->withPointerParameters("reg", reg)
|
||||||
|
->withUnsignedIntParameters("bit_num", bit_num);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool RegEdit_IsBitSet(void *reg, uint8_t bit_num)
|
||||||
|
{
|
||||||
|
|
||||||
|
return mock_c()->actualCall("RegEdit_IsBitSet")
|
||||||
|
->withPointerParameters("reg", reg)
|
||||||
|
->withUnsignedIntParameters("bit_num", bit_num)
|
||||||
|
->returnBoolValueOrDefault(true);
|
||||||
|
//return mock_c()->returnBoolValueOrDefault(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RegEdit_OR_Num(void *reg, uint32_t num)
|
||||||
|
{
|
||||||
|
mock_c()->actualCall("RegEdit_OR_Num")
|
||||||
|
->withPointerParameters("reg", reg)
|
||||||
|
->withUnsignedIntParameters("num", num);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RegEdit_AND_Num(void *reg, uint32_t num)
|
||||||
|
{
|
||||||
|
mock_c()->actualCall("RegEdit_AND_Num")
|
||||||
|
->withPointerParameters("reg", reg)
|
||||||
|
->withUnsignedIntParameters("num", num);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void RegEdit_SetNum(void *reg, uint32_t num)
|
||||||
|
{
|
||||||
|
mock_c()->actualCall("RegEdit_SetNum")
|
||||||
|
->withPointerParameters("reg", reg)
|
||||||
|
->withUnsignedIntParameters("num", num);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
uint8_t RegEdit_ReadReg(void *reg)
|
||||||
|
{
|
||||||
|
uint8_t value = *(uint8_t *)reg;
|
||||||
|
|
||||||
|
mock_c()->actualCall("RegEdit_ReadReg")
|
||||||
|
->withPointerParameters("reg", reg)
|
||||||
|
->returnUnsignedIntValueOrDefault(value);
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
30
mocks/MockRegEdit/MockRegEdit.h
Normal file
30
mocks/MockRegEdit/MockRegEdit.h
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
/**
|
||||||
|
* @brief PUT_TEXT_HERE
|
||||||
|
* @details This file is...
|
||||||
|
* @author username
|
||||||
|
* @date todays_date
|
||||||
|
* @copyright None
|
||||||
|
* @file MockRegEdit.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MOCKREGEDIT_H
|
||||||
|
#define MOCKREGEDIT_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
void RegEdit_SetRegister(void *reg);
|
||||||
|
void RegEdit_ClearRegister(void *reg);
|
||||||
|
void RegEdit_SetBit(void *reg, uint8_t bit_num);
|
||||||
|
void RegEdit_ClearBit(void *reg, uint8_t bit_num);
|
||||||
|
bool RegEdit_IsBitSet(void *reg, uint8_t bit_num);
|
||||||
|
|
||||||
|
void RegEdit_OR_Num(void *reg, uint32_t num);
|
||||||
|
void RegEdit_AND_Num(void *reg, uint32_t num);
|
||||||
|
|
||||||
|
void RegEdit_SetNum(void *reg, uint32_t num);
|
||||||
|
|
||||||
|
uint8_t RegEdit_ReadReg(void *reg);
|
||||||
|
|
||||||
|
#endif //MOCKREGEDIT_H
|
||||||
51
mocks/MockRegEdit/u8_comparator.cpp
Normal file
51
mocks/MockRegEdit/u8_comparator.cpp
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
#include "u8_comparator.hpp"
|
||||||
|
#include "CppUTest/SimpleString.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
class MyTypeComparator : public MockNamedValueComparator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool isEqual(const void* object1, const void* object2)
|
||||||
|
{
|
||||||
|
return object1 == object2;
|
||||||
|
}
|
||||||
|
virtual SimpleString valueToString(const void* object)
|
||||||
|
{
|
||||||
|
return StringFrom(object);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
|
bool UInt8PointerComparator::isEqual(const void* object1, const void* object2) {
|
||||||
|
const uint8_t* ptr1 = reinterpret_cast<const uint8_t*>(object1);
|
||||||
|
const uint8_t* ptr2 = reinterpret_cast<const uint8_t*>(object2);
|
||||||
|
return std::memcmp(ptr1, ptr2, sizeof(uint8_t)) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
SimpleString UInt8PointerComparator::valueToString(const void* object) {
|
||||||
|
const uint8_t* ptr = reinterpret_cast<const uint8_t*>(object);
|
||||||
|
return StringFromFormat("0x%02x", *ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
bool UInt8PointerComparator::isEqual(const void* object1, const void* object2) const {
|
||||||
|
const uint8_t* ptr1 = static_cast<const uint8_t*>(object1);
|
||||||
|
const uint8_t* ptr2 = static_cast<const uint8_t*>(object2);
|
||||||
|
return std::memcmp(ptr1, ptr2, sizeof(uint8_t)) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
SimpleString UInt8PointerComparator::valueToString(const void* object) const {
|
||||||
|
const uint8_t* ptr = static_cast<const uint8_t*>(object);
|
||||||
|
return StringFromFormat("0x%02x", *ptr);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
bool UInt8Comparator::isEqual(const void* object1, const void* object2) {
|
||||||
|
return (uint8_t*)object1 == (uint8_t *)object2;
|
||||||
|
}
|
||||||
|
|
||||||
|
SimpleString UInt8Comparator::valueToString(const void* object) {
|
||||||
|
//uint8_t value = reinterpret_cast<uint8_t>(object);
|
||||||
|
const uint8_t *ptr = reinterpret_cast<const uint8_t*>(object);
|
||||||
|
return StringFromFormat("0x%02x", *ptr);
|
||||||
|
}
|
||||||
20
mocks/MockRegEdit/u8_comparator.hpp
Normal file
20
mocks/MockRegEdit/u8_comparator.hpp
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
#ifndef U8_COMPARATOR_H
|
||||||
|
#define U8_COMPARATOR_H
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstring>
|
||||||
|
#include <CppUTestExt/MockSupport.h>
|
||||||
|
|
||||||
|
class UInt8PointerComparator : public MockNamedValueComparator {
|
||||||
|
public:
|
||||||
|
virtual bool isEqual(const void* object1, const void* object2) override;
|
||||||
|
SimpleString valueToString(const void* object) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
class UInt8Comparator : public MockNamedValueComparator {
|
||||||
|
public:
|
||||||
|
virtual bool isEqual(const void* object1, const void* object2) override;
|
||||||
|
SimpleString valueToString(const void* object) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //U8_COMPARATOR_H
|
||||||
7
mocks/TimerMock/CMakeLists.txt
Normal file
7
mocks/TimerMock/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
add_library(TimerMock STATIC
|
||||||
|
TimerMock.c
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(TimerMock PUBLIC
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}
|
||||||
|
)
|
||||||
31
mocks/TimerMock/TimerMock.c
Normal file
31
mocks/TimerMock/TimerMock.c
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
/*
|
||||||
|
* Author: Jake G
|
||||||
|
* Date: 2024-09-02
|
||||||
|
* filename: TimerMock.c
|
||||||
|
* description: mocks timers
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "TimerMock.h"
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "CppUTestExt/MockSupport_c.h"
|
||||||
|
|
||||||
|
static bool timer_started = false;
|
||||||
|
|
||||||
|
void Timer_Start(void)
|
||||||
|
{
|
||||||
|
mock_c()->actualCall("Timer_Start");
|
||||||
|
timer_started = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Timer_Stop(void)
|
||||||
|
{
|
||||||
|
mock_c()->actualCall("Timer_Stop");
|
||||||
|
timer_started = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t Timer_GetOverflowCount(void)
|
||||||
|
{
|
||||||
|
uint16_t time = 0xAAAA;
|
||||||
|
return mock_c()->actualCall("Timer_GetOverflowCount")
|
||||||
|
->returnUnsignedIntValueOrDefault(time);
|
||||||
|
}
|
||||||
26
mocks/TimerMock/TimerMock.h
Normal file
26
mocks/TimerMock/TimerMock.h
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
/**
|
||||||
|
* @brief A Mock of the timer module.
|
||||||
|
* @details This file is only used for testing.
|
||||||
|
* @author Jake G
|
||||||
|
* @date 2024-09-02
|
||||||
|
* @copyright None
|
||||||
|
* @file TimerMock.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TIMER_MOCK_H
|
||||||
|
#define TIMER_MOCK_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A function
|
||||||
|
* @param a The first argument
|
||||||
|
*/
|
||||||
|
void Timer_Start(void);
|
||||||
|
|
||||||
|
void Timer_Stop(void);
|
||||||
|
|
||||||
|
uint16_t Timer_GetOverflowCount(void);
|
||||||
|
|
||||||
|
|
||||||
|
#endif //TIMER_MOCK_H
|
||||||
Loading…
Add table
Reference in a new issue