Skip to content

Commit b1dc726

Browse files
authored
chore: Remove default Notecarrier support (#81)
1 parent 810eb4a commit b1dc726

File tree

4 files changed

+53
-56
lines changed

4 files changed

+53
-56
lines changed

examples/Example2_PeriodicCommunications/Example2_PeriodicCommunications.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747
// Include the Arduino library for the Notecard
4848
#include <Notecard.h>
49+
#include <Notecarrier.h>
4950
#include <Wire.h>
5051

5152
// Note that both of these definitions are optional; just prefix either line with // to remove it.

examples/Example7_PowerControl/Example7_PowerControl.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void setup()
6060
// restarting after having been put to sleep by the Notecard.
6161
NotePayloadDesc payload;
6262
bool retrieved = NotePayloadRetrieveAfterSleep(&payload);
63-
63+
6464
// If the payload was successfully retrieved, attempt to restore state from the payload
6565
if (retrieved) {
6666

@@ -73,7 +73,7 @@ void setup()
7373
NotePayloadFree(&payload);
7474

7575
}
76-
76+
7777
// If this is our first time through, initialize the Notecard and state
7878
if (!retrieved) {
7979

src/Notecard.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@
3636
#include "mock/mock-parameters.hpp"
3737
#endif
3838

39-
#ifndef REMOVE_NOTECARRIER_SUPPORT
40-
#include "NotecarrierSupport.h"
41-
#endif
42-
4339
/**************************************************************************/
4440
/*!
4541
@brief Class that stores state and functions for interacting with the

src/NotecarrierSupport.h renamed to src/Notecarrier.h

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,49 @@
4848
#define D13 13
4949
#endif
5050

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)
5294

5395
#ifdef B0
5496
#undef B0
@@ -97,17 +139,12 @@
97139
#endif
98140
#define B0 PNUM_NOT_DEFINED
99141

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)
106143

107144
#ifdef B0
108145
#undef B0
109146
#endif
110-
#define B0 CS
147+
#define B0 4
111148

112149
#elif defined(ARDUINO_NRF52840_FEATHER)
113150

@@ -116,54 +153,17 @@
116153
#endif
117154
#define B0 0
118155

119-
#elif defined(ARDUINO_FEATHER_M4)
156+
#elif defined(ARDUINO_SWAN_R5)
120157

121-
#ifdef B0
122-
#undef B0
158+
#ifdef CS
159+
#undef CS
123160
#endif
124-
#define B0 4
125-
126-
#elif defined(ARDUINO_APOLLO3_SFE_ARTEMIS_THING_PLUS)
161+
#define CS PD0
127162

128163
#ifdef B0
129164
#undef B0
130165
#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
167167

168168
#endif
169169

0 commit comments

Comments
 (0)