mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
CJMCU - Add support for LED2. Swap usage of LED0 and LED1.
Currently the LED2 (blue) is just enabled after the main board initialisation is complete and then it stays on.
This commit is contained in:
parent
3e4bf46f1e
commit
83a5c319b5
4 changed files with 32 additions and 2 deletions
|
@ -48,4 +48,20 @@
|
|||
#define LED1_ON
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LED2
|
||||
#define LED2_TOGGLE digitalToggle(LED2_GPIO, LED2_PIN);
|
||||
#ifndef LED2_INVERTED
|
||||
#define LED2_OFF digitalHi(LED2_GPIO, LED2_PIN);
|
||||
#define LED2_ON digitalLo(LED2_GPIO, LED2_PIN);
|
||||
#else
|
||||
#define LED2_OFF digitalLo(LED2_GPIO, LED2_PIN);
|
||||
#define LED2_ON digitalHi(LED2_GPIO, LED2_PIN);
|
||||
#endif // inverted
|
||||
#else
|
||||
#define LED2_TOGGLE
|
||||
#define LED2_OFF
|
||||
#define LED2_ON
|
||||
#endif
|
||||
|
||||
void ledInit(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue