generated from TDD-Templates/cmake_cpputest_template_avr
removed now uneeded functions.
This commit is contained in:
parent
90891545d1
commit
fc3d0d11a5
|
@ -16,12 +16,6 @@ int fake_index = 0;
|
|||
static bool is_setup = false;
|
||||
|
||||
|
||||
|
||||
void ADC_SetPin(uint8_t adc_chan)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void ADC_Setup(void)
|
||||
{
|
||||
is_setup = true;
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
|
||||
void ADC_Setup(void);
|
||||
void ADC_SetPin(uint8_t adc_chan);
|
||||
void ADC_Init(uint8_t adc_chan);
|
||||
void ADC_Enable(void);
|
||||
void ADC_Disable(void);
|
||||
|
|
|
@ -85,13 +85,6 @@ void ADC_Disable() {
|
|||
RegEdit_ClearBit((void *)&ADCSRA, ADEN);
|
||||
}
|
||||
|
||||
void ADC_SetPin(uint8_t adc_chan) {
|
||||
if (IsInvalidChannel(adc_chan)) {
|
||||
return;
|
||||
}
|
||||
// RegEdit_ClearRegister((void *)&ADC0.MUXPOS);
|
||||
// RegEdit_SetNum((void *)&ADC0.MUXPOS, adc_chan);
|
||||
}
|
||||
|
||||
uint16_t ADC_ReadValue_Impl(uint8_t adc_chan) {
|
||||
// RegEdit_SetNum((void *)&ADC0.COMMAND, ADC_STCONV_bm);
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
void ADC_Init(uint8_t adc_chan);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Returns the pin number for the adc channel or 255 on an error.
|
||||
* @param The ADC channel.
|
||||
|
@ -64,11 +65,5 @@ extern uint16_t (*ADC_ReadValue)(uint8_t adc_chan);
|
|||
*/
|
||||
void ADC_Setup(void);
|
||||
|
||||
/**
|
||||
* @brief Sets the pin used in the MUX for ADC0.
|
||||
*
|
||||
* @param adc_chan The number of the pin in Port A.
|
||||
*/
|
||||
void ADC_SetPin(uint8_t adc_chan);
|
||||
|
||||
#endif // ADC_H
|
||||
|
|
|
@ -141,28 +141,6 @@ TEST(test_ADC, ADC_DisablePasses)
|
|||
}
|
||||
|
||||
|
||||
TEST(test_ADC, ADC_SetPinSetsRightRegisters)
|
||||
{
|
||||
/*
|
||||
//It clears existing MUXPOS register values.
|
||||
mock().expectOneCall("RegEdit_ClearRegister")
|
||||
.withPointerParameter("reg", (void *) &ADC0.MUXPOS);
|
||||
|
||||
//It Correctly sets the pin number.
|
||||
mock().expectOneCall("RegEdit_SetNum")
|
||||
.withPointerParameter("reg", (void *) &ADC0.MUXPOS)
|
||||
.withUnsignedIntParameter("num", 4);
|
||||
*/
|
||||
//ADC_SetPin(4);
|
||||
}
|
||||
|
||||
|
||||
TEST(test_ADC, ADC_SetPinFailsOnInvalidPin)
|
||||
{
|
||||
//ADC_SetPin(8);
|
||||
}
|
||||
|
||||
|
||||
static uint16_t ADC_ReadValueFake(uint8_t pin_num)
|
||||
{
|
||||
return 512;
|
||||
|
|
Loading…
Reference in New Issue