File tree Expand file tree Collapse file tree 4 files changed +53
-56
lines changed
Example2_PeriodicCommunications Expand file tree Collapse file tree 4 files changed +53
-56
lines changed Original file line number Diff line number Diff line change 46
46
47
47
// Include the Arduino library for the Notecard
48
48
#include < Notecard.h>
49
+ #include < Notecarrier.h>
49
50
#include < Wire.h>
50
51
51
52
// Note that both of these definitions are optional; just prefix either line with // to remove it.
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ void setup()
60
60
// restarting after having been put to sleep by the Notecard.
61
61
NotePayloadDesc payload;
62
62
bool retrieved = NotePayloadRetrieveAfterSleep (&payload);
63
-
63
+
64
64
// If the payload was successfully retrieved, attempt to restore state from the payload
65
65
if (retrieved) {
66
66
@@ -73,7 +73,7 @@ void setup()
73
73
NotePayloadFree (&payload);
74
74
75
75
}
76
-
76
+
77
77
// If this is our first time through, initialize the Notecard and state
78
78
if (!retrieved) {
79
79
Original file line number Diff line number Diff line change 36
36
#include " mock/mock-parameters.hpp"
37
37
#endif
38
38
39
- #ifndef REMOVE_NOTECARRIER_SUPPORT
40
- #include " NotecarrierSupport.h"
41
- #endif
42
-
43
39
/* *************************************************************************/
44
40
/* !
45
41
@brief Class that stores state and functions for interacting with the
Original file line number Diff line number Diff line change 48
48
#define D13 13
49
49
#endif
50
50
51
- #if defined(ARDUINO_FEATHER_ESP32 )
51
+ #if defined(ARDUINO_APOLLO3_SFE_ARTEMIS_THING_PLUS )
52
+
53
+ #ifdef B0
54
+ #undef B0
55
+ #endif
56
+ #define B0 2
57
+
58
+ #ifdef D5
59
+ #undef D5
60
+ #endif
61
+ #define D5 3
62
+
63
+ #ifdef D6
64
+ #undef D6
65
+ #endif
66
+ #define D6 4
67
+
68
+ #ifdef D9
69
+ #undef D9
70
+ #endif
71
+ #define D9 5
72
+
73
+ #ifdef D10
74
+ #undef D10
75
+ #endif
76
+ #define D10 6
77
+
78
+ #ifdef D11
79
+ #undef D11
80
+ #endif
81
+ #define D11 7
82
+
83
+ #ifdef D12
84
+ #undef D12
85
+ #endif
86
+ #define D12 8
87
+
88
+ #ifdef D13
89
+ #undef D13
90
+ #endif
91
+ #define D13 9
92
+
93
+ #elif defined(ARDUINO_FEATHER_ESP32 )
52
94
53
95
#ifdef B0
54
96
#undef B0
97
139
#endif
98
140
#define B0 PNUM_NOT_DEFINED
99
141
100
- #elif defined(ARDUINO_SWAN_R5 )
101
-
102
- #ifdef CS
103
- #undef CS
104
- #endif
105
- #define CS PD0
142
+ #elif defined(ARDUINO_FEATHER_M4 )
106
143
107
144
#ifdef B0
108
145
#undef B0
109
146
#endif
110
- #define B0 CS
147
+ #define B0 4
111
148
112
149
#elif defined(ARDUINO_NRF52840_FEATHER )
113
150
116
153
#endif
117
154
#define B0 0
118
155
119
- #elif defined(ARDUINO_FEATHER_M4 )
156
+ #elif defined(ARDUINO_SWAN_R5 )
120
157
121
- #ifdef B0
122
- #undef B0
158
+ #ifdef CS
159
+ #undef CS
123
160
#endif
124
- #define B0 4
125
-
126
- #elif defined(ARDUINO_APOLLO3_SFE_ARTEMIS_THING_PLUS )
161
+ #define CS PD0
127
162
128
163
#ifdef B0
129
164
#undef B0
130
165
#endif
131
- #define B0 2
132
-
133
- #ifdef D5
134
- #undef D5
135
- #endif
136
- #define D5 3
137
-
138
- #ifdef D6
139
- #undef D6
140
- #endif
141
- #define D6 4
142
-
143
- #ifdef D9
144
- #undef D9
145
- #endif
146
- #define D9 5
147
-
148
- #ifdef D10
149
- #undef D10
150
- #endif
151
- #define D10 6
152
-
153
- #ifdef D11
154
- #undef D11
155
- #endif
156
- #define D11 7
157
-
158
- #ifdef D12
159
- #undef D12
160
- #endif
161
- #define D12 8
162
-
163
- #ifdef D13
164
- #undef D13
165
- #endif
166
- #define D13 9
166
+ #define B0 CS
167
167
168
168
#endif
169
169
You can’t perform that action at this time.
0 commit comments