generated from TDD-Templates/cmake_cpputest_template_avr
Added expectations for setup.
- Commented out attiny404 expectations.
This commit is contained in:
parent
9228d0703f
commit
a5bb712789
|
@ -37,7 +37,6 @@ TEST(test_ADC, FirstTest)
|
|||
CHECK(true);
|
||||
}
|
||||
|
||||
|
||||
TEST(test_ADC, ADC_SetupSetsRegisters)
|
||||
{
|
||||
/*
|
||||
|
@ -48,7 +47,7 @@ TEST(test_ADC, ADC_SetupSetsRegisters)
|
|||
* 11 == ADC3/PB3
|
||||
*/
|
||||
|
||||
/*Set the ADC Channel 0 using ADMUX reg*/
|
||||
/*Set the ADC Channel 0 (default) using ADMUX reg*/
|
||||
mock().expectOneCall("RegEdit_SetNum")
|
||||
.withPointerParameter("reg", (void *) &ADMUX)
|
||||
.withUnsignedIntParameter("num", 0x00);
|
||||
|
@ -63,11 +62,22 @@ TEST(test_ADC, ADC_SetupSetsRegisters)
|
|||
.withPointerParameter("reg", (void *) &ADMUX)
|
||||
.withUnsignedIntParameter("bit_num", 5);
|
||||
|
||||
/*Set the Prescaler for samping frequency.*/
|
||||
/*Clears the ADC status register to start*/
|
||||
mock().expectOneCall("RegEdit_ClearRegister")
|
||||
.withPointerParameter("reg", (void *) &ADCSRA);
|
||||
|
||||
/*Set the Prescaler (F_CPU/8) for samping frequency.*/
|
||||
mock().expectOneCall("RegEdit_SetBit")
|
||||
.withParameter("reg", (void *) &ADCSRA)
|
||||
.withUnsignedIntParameter("bit_num", 0);
|
||||
mock().expectOneCall("RegEdit_SetBit")
|
||||
.withParameter("reg", (void *) &ADCSRA)
|
||||
.withUnsignedIntParameter("bit_num", 1);
|
||||
|
||||
|
||||
/*Set the ADC Enable bit ADEN in ADCSCR*/
|
||||
|
||||
|
||||
/*
|
||||
//Clears control register A for ADC0
|
||||
mock().expectOneCall("RegEdit_SetNum")
|
||||
.withPointerParameter("reg", (void *) &ADC0.CTRLA)
|
||||
|
@ -97,6 +107,7 @@ TEST(test_ADC, ADC_SetupSetsRegisters)
|
|||
mock().expectOneCall("RegEdit_SetBit")
|
||||
.withPointerParameter("reg", (void *) &ADC0.CTRLD)
|
||||
.withUnsignedIntParameter("bit_num", 4);
|
||||
*/
|
||||
|
||||
ADC_Setup();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue