File tree Expand file tree Collapse file tree 6 files changed +24
-4
lines changed
SampleProjects/TestSomething/test Expand file tree Collapse file tree 6 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 1+ #include < ArduinoUnitTests.h>
2+ #include < Arduino.h>
3+
4+ unittest (check_ADCSRA_read_write) {
5+ ADCSRA = 123 ;
6+
7+ assertEqual (123 , ADCSRA);
8+ }
9+
10+ unittest_main ()
Original file line number Diff line number Diff line change 11#include < ArduinoUnitTests.h>
22#include < Arduino.h>
33
4+ // just check if declaration compiles
45ISR (WDT_vect) {
56}
67
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ typedef uint8_t byte;
2424// Math and Trig
2525#include "AvrMath.h"
2626
27+ #include "AvrAdc.h"
2728#include <avr/interrupt.h>
2829
2930#include "Godmode.h"
Original file line number Diff line number Diff line change 1+ #include " AvrAdc.h"
2+
3+ // mock storage to allow access to ADCSRA
4+ unsigned char sfr_store;
Original file line number Diff line number Diff line change 1+ #ifndef _AVR_ADC_H_
2+ #define _AVR_ADC_H_
3+
4+ // mock storage to allow access to ADCSRA
5+ extern unsigned char sfr_store ;
6+ #define _SFR_MEM8 (mem_addr ) sfr_store
7+
8+ #endif // _AVR_ADC_H_
Original file line number Diff line number Diff line change @@ -37,8 +37,4 @@ void sleep_mode() {
3737 sleep_disable ();
3838}
3939
40- // mock storage to allow access to ADCSRA
41- unsigned char sfr_store ;
42- #define _SFR_MEM8 (mem_addr ) sfr_store
43-
4440#endif /* _AVR_SLEEP_H_ */
You can’t perform that action at this time.
0 commit comments