mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Merge pull request #3419 from jflyper/bfdev-allow-3-leds-to-be-configured
Allow all three leds to be configurable
This commit is contained in:
commit
57d27f45f8
1 changed files with 12 additions and 6 deletions
|
@ -29,17 +29,23 @@ PG_REGISTER_WITH_RESET_FN(statusLedConfig_t, statusLedConfig, PG_STATUS_LED_CONF
|
||||||
static IO_t leds[STATUS_LED_NUMBER];
|
static IO_t leds[STATUS_LED_NUMBER];
|
||||||
static uint8_t ledInversion = 0;
|
static uint8_t ledInversion = 0;
|
||||||
|
|
||||||
|
#ifndef LED0_PIN
|
||||||
|
#define LED0_PIN NONE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef LED1_PIN
|
||||||
|
#define LED1_PIN NONE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef LED2_PIN
|
||||||
|
#define LED2_PIN NONE
|
||||||
|
#endif
|
||||||
|
|
||||||
void pgResetFn_statusLedConfig(statusLedConfig_t *statusLedConfig)
|
void pgResetFn_statusLedConfig(statusLedConfig_t *statusLedConfig)
|
||||||
{
|
{
|
||||||
#ifdef LED0_PIN
|
|
||||||
statusLedConfig->ioTags[0] = IO_TAG(LED0_PIN);
|
statusLedConfig->ioTags[0] = IO_TAG(LED0_PIN);
|
||||||
#endif
|
|
||||||
#ifdef LED1_PIN
|
|
||||||
statusLedConfig->ioTags[1] = IO_TAG(LED1_PIN);
|
statusLedConfig->ioTags[1] = IO_TAG(LED1_PIN);
|
||||||
#endif
|
|
||||||
#ifdef LED2_PIN
|
|
||||||
statusLedConfig->ioTags[2] = IO_TAG(LED2_PIN);
|
statusLedConfig->ioTags[2] = IO_TAG(LED2_PIN);
|
||||||
#endif
|
|
||||||
|
|
||||||
statusLedConfig->inversion = 0
|
statusLedConfig->inversion = 0
|
||||||
#ifdef LED0_INVERTED
|
#ifdef LED0_INVERTED
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue