File tree 6 files changed +24
-4
lines changed
SampleProjects/TestSomething/test
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 1
1
#include < ArduinoUnitTests.h>
2
2
#include < Arduino.h>
3
3
4
+ // just check if declaration compiles
4
5
ISR (WDT_vect) {
5
6
}
6
7
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ typedef uint8_t byte;
24
24
// Math and Trig
25
25
#include "AvrMath.h"
26
26
27
+ #include "AvrAdc.h"
27
28
#include <avr/interrupt.h>
28
29
29
30
#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() {
37
37
sleep_disable ();
38
38
}
39
39
40
- // mock storage to allow access to ADCSRA
41
- unsigned char sfr_store ;
42
- #define _SFR_MEM8 (mem_addr ) sfr_store
43
-
44
40
#endif /* _AVR_SLEEP_H_ */
You can’t perform that action at this time.
0 commit comments