Skip to content

Commit 2e39771

Browse files
MiKfbraghiroli
authored andcommitted
Change sme function for RGB Led.
It is now conform to the button user function, camel case function.
1 parent c14cdd8 commit 2e39771

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

hardware/AMEL/samd/variants/AMEL_SmartEverything/variant.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -273,32 +273,32 @@ void SERCOM5_Handler()
273273
}
274274

275275

276-
void LED_GREEN_ON(uint32_t value) {
276+
void ledGreenLight(uint32_t value) {
277277
if (value == HIGH) {
278278
digitalWrite(PIN_LED_GREEN, LOW);
279-
} else if (value == LOW) {
279+
} else if (value == LOW) {
280280
digitalWrite(PIN_LED_GREEN, HIGH);
281-
} else {
281+
} else {
282282
digitalWrite(PIN_LED_GREEN, 255-value); // in case of PWM
283283
}
284284
}
285285

286-
void LED_RED_ON(uint32_t value) {
286+
void ledRedLight(uint32_t value) {
287287
if (value == HIGH) {
288288
digitalWrite(PIN_LED_RED, LOW);
289-
} else if (value == LOW) {
289+
} else if (value == LOW) {
290290
digitalWrite(PIN_LED_RED, HIGH);
291-
} else {
291+
} else {
292292
digitalWrite(PIN_LED_RED, 255-value); // in case of PWM
293293
}
294294
}
295295

296-
void LED_BLUE_ON(uint32_t value) {
296+
void ledBlueLight(uint32_t value) {
297297
if (value == HIGH) {
298298
digitalWrite(PIN_LED_BLUE, LOW);
299-
} else if (value == LOW) {
299+
} else if (value == LOW) {
300300
digitalWrite(PIN_LED_BLUE, HIGH);
301-
} else {
301+
} else {
302302
digitalWrite(PIN_LED_BLUE, 255-value); // in case of PWM
303303
}
304304
}

hardware/AMEL/samd/variants/AMEL_SmartEverything/variant.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,20 +181,20 @@ static const uint8_t SCK = PIN_SPI_SCK ;
181181
RGB wrapper function
182182
These functions has been created for a more comfortable use
183183
because internally wrap the inversion of the HIGH, LOW meaning
184-
184+
185185
Using these function it remain the same Arduino User Experience to light a led
186186
HIGH = Light ON
187187
LOW = Light OFF
188-
189-
*/
190-
void LED_GREEN_ON(uint32_t value);
191-
void LED_RED_ON(uint32_t value);
192-
void LED_BLUE_ON(uint32_t value);
188+
189+
*/
190+
void ledGreenLight(uint32_t value);
191+
void ledRedLight(uint32_t value);
192+
void ledBlueLight(uint32_t value);
193193

194194

195195
/*
196196
User Button wrapper function.
197-
197+
198198
return:
199199
1 = button PRESSED
200200
0 = button RELEASED
@@ -216,7 +216,7 @@ int button2IsPressed(void);
216216
/* =========================
217217
* ===== SERCOM DEFINITION
218218
* =========================
219-
*/
219+
*/
220220
extern SERCOM sercom0;
221221
extern SERCOM sercom1;
222222
extern SERCOM sercom2;
@@ -258,7 +258,7 @@ extern Uart SigFox;
258258
#define LED_RED_INIT pinMode(PIN_LED_RED, OUTPUT)
259259
#define LED_BLUE_INIT pinMode(PIN_LED_BLUE, OUTPUT)
260260

261-
261+
262262
extern uint8_t smeInitError;
263263
#endif /* _VARIANT_AMEL_SMARTEVERYTHING_ */
264264

0 commit comments

Comments
 (0)