File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed
hardware/AMEL/samd/variants/AMEL_SmartEverything Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -272,6 +272,25 @@ void SERCOM5_Handler()
272
272
BLE.IrqHandler ();
273
273
}
274
274
275
+ void ledYellowTwoLight (uint32_t value) {
276
+ if (value == HIGH) {
277
+ digitalWrite (PIN_LED_RXL, LOW);
278
+ } else if (value == LOW) {
279
+ digitalWrite (PIN_LED_RXL, HIGH);
280
+ } else {
281
+ analogWrite (PIN_LED_RXL, 255 -value); // in case of PWM
282
+ }
283
+ }
284
+
285
+ void ledYellowOneLight (uint32_t value) {
286
+ if (value == HIGH) {
287
+ digitalWrite (PIN_LED_TXL, LOW);
288
+ } else if (value == LOW) {
289
+ digitalWrite (PIN_LED_TXL, HIGH);
290
+ } else {
291
+ analogWrite (PIN_LED_TXL, 255 -value); // in case of PWM
292
+ }
293
+ }
275
294
276
295
void ledGreenLight (uint32_t value) {
277
296
if (value == HIGH) {
Original file line number Diff line number Diff line change @@ -191,6 +191,18 @@ void ledGreenLight(uint32_t value);
191
191
void ledRedLight (uint32_t value );
192
192
void ledBlueLight (uint32_t value );
193
193
194
+ /*
195
+ Yellow Led wrapper function
196
+ These functions has been created for a more comfortable use
197
+ because internally wrap the inversion of the HIGH, LOW meaning
198
+
199
+ Using these function it remain the same Arduino User Experience to light a led
200
+ HIGH = Light ON
201
+ LOW = Light OFF
202
+
203
+ */
204
+ void ledYellowOneLight (uint32_t value );
205
+ void ledYellowTwoLight (uint32_t value );
194
206
195
207
/*
196
208
User Button wrapper function.
@@ -258,6 +270,9 @@ extern Uart SigFox;
258
270
#define LED_RED_INIT pinMode(PIN_LED_RED, OUTPUT)
259
271
#define LED_BLUE_INIT pinMode(PIN_LED_BLUE, OUTPUT)
260
272
273
+ #define LED_YELLOW_TWO_INIT pinMode(PIN_LED_RXL, OUTPUT)
274
+ #define LED_YELLOW_ONE_INIT pinMode(PIN_LED_TXL, OUTPUT)
275
+
261
276
262
277
extern uint8_t smeInitError ;
263
278
#endif /* _VARIANT_AMEL_SMARTEVERYTHING_ */
Original file line number Diff line number Diff line change @@ -150,6 +150,11 @@ static void ioExtenderInit(void) {
150
150
151
151
152
152
void initVariant () {
153
+
154
+ // initializa the two Yellow Led
155
+ LED_YELLOW_ONE_INIT;
156
+ LED_YELLOW_TWO_INIT;
157
+
153
158
// reset the I/O Extender
154
159
pinMode (PIN_IO_EXT_RST, OUTPUT);
155
160
digitalWrite (PIN_IO_EXT_RST, LOW);
You can’t perform that action at this time.
0 commit comments