74 lines
1.7 KiB
C
74 lines
1.7 KiB
C
|
/*
|
||
|
* 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, uint8_t num)
|
||
|
{
|
||
|
mock_c()->actualCall("RegEdit_OR_Num")
|
||
|
->withPointerParameters("reg", reg)
|
||
|
->withUnsignedIntParameters("num", num);
|
||
|
}
|
||
|
|
||
|
|
||
|
void RegEdit_AND_Num(void *reg, uint8_t num)
|
||
|
{
|
||
|
mock_c()->actualCall("RegEdit_AND_Num")
|
||
|
->withPointerParameters("reg", reg)
|
||
|
->withUnsignedIntParameters("num", num);
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
void RegEdit_SetNum(void *reg, uint8_t num)
|
||
|
{
|
||
|
mock_c()->actualCall("RegEdit_SetNum")
|
||
|
->withPointerParameters("reg", reg)
|
||
|
->withUnsignedIntParameters("num", num);
|
||
|
}
|