File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,15 @@ Mock Arduino.h library.
5
5
Where possible, variable names from the Arduino library are used to avoid conflicts
6
6
7
7
*/
8
+
9
+ // hardware mocks
10
+ volatile long long __ARDUINO_CI_SFR_MOCK [1024 ];
11
+ #define _SFR_IO8 (io_addr ) (*(volatile uint8_t *)(__ARDUINO_CI_SFR_MOCK + io_addr)) // this macro is all we need from the sfr file
12
+ #define _SFR_IO16 (io_addr ) (*(volatile uint16_t *)(__ARDUINO_CI_SFR_MOCK + io_addr)) // this macro is all we need from the sfr file
13
+ #define _SFR_MEM8 (io_addr ) (*(volatile uint8_t *)(__ARDUINO_CI_SFR_MOCK + io_addr)) // this macro is all we need from the sfr file
14
+ #define _SFR_MEM16 (io_addr ) (*(volatile uint16_t *)(__ARDUINO_CI_SFR_MOCK + io_addr)) // this macro is all we need from the sfr file
15
+ #define _SFR_MEM32 (io_addr ) (*(volatile uint32_t *)(__ARDUINO_CI_SFR_MOCK + io_addr)) // this macro is all we need from the sfr file
16
+
8
17
// Chars and strings
9
18
10
19
#include "ArduinoDefines.h"
@@ -71,5 +80,3 @@ inline unsigned int makeWord(unsigned int w) { return w; }
71
80
inline unsigned int makeWord (unsigned char h , unsigned char l ) { return (h << 8 ) | l ; }
72
81
73
82
#define word (...) makeWord(__VA_ARGS__)
74
-
75
-
Original file line number Diff line number Diff line change 96
96
#ifndef _AVR_IO_H_
97
97
#define _AVR_IO_H_
98
98
99
- #define _SFR_IO8 (io_addr ) (*(volatile uint8_t *)(io_addr)) // this macro is all we need from the sfr file
100
-
101
99
#if defined (__AVR_AT94K__ )
102
100
# include "ioat94k.h"
103
101
#elif defined (__AVR_AT43USB320__ )
You can’t perform that action at this time.
0 commit comments