Refactored to match ADC interface

This commit is contained in:
jakeg00dwin 2024-07-28 17:02:47 -07:00
parent c2b2ae894a
commit 10867edb7a
2 changed files with 12 additions and 6 deletions

View File

@ -16,6 +16,12 @@ int fake_index = 0;
static bool is_setup = false;
void ADC_SetPin(uint8_t pin_num)
{
return;
}
void ADC_Setup(void)
{
is_setup = true;
@ -28,10 +34,9 @@ void ADC_Init(uint8_t pin_num)
->withUnsignedIntParameters("pin_num", pin_num);
}
void ADC_Enable(uint8_t pin_num)
void ADC_Enable(void)
{
mock_c()->actualCall("ADC_Enable")
->withUnsignedIntParameters("pin_num", pin_num);
mock_c()->actualCall("ADC_Enable");
}
void ADC_Disable()

View File

@ -15,9 +15,10 @@
void ADC_Setup(void);
void ADC_SetPin(uint8_t pin_num);
void ADC_Init(uint8_t pin_num);
void ADC_Enable(uint8_t pin_num);
void ADC_Disable();
void ADC_Enable(void);
void ADC_Disable(void);
extern uint16_t (*ADC_ReadValue)(uint8_t pin_num);