Adapt LED handling to MMDVM options

pull/45/head
phl0 8 years ago
parent 602d773377
commit 57878e1cea
No known key found for this signature in database
GPG Key ID: 48EA1E640798CA9A

@ -70,6 +70,12 @@
// Constant Service LED once repeater is running
// #define CONSTANT_SRV_LED
// Use the YSF and P25 LEDs for NXDN
// #define USE_ALTERNATE_NXDN_LEDS
// Use the D-Star and DMR LEDs for POCSAG
// #define USE_ALTERNATE_POCSAG_LEDS
// Enable modem debug messages
// #define ENABLE_DEBUG

@ -313,15 +313,21 @@ void CIO::P25_pin(bool on)
void CIO::NXDN_pin(bool on)
{
#if defined(USE_ALTERNATE_NXDN_LEDS)
digitalWrite(PIN_YSF_LED, on ? HIGH : LOW);
digitalWrite(PIN_P25_LED, on ? HIGH : LOW);
#else
digitalWrite(PIN_NXDN_LED, on ? HIGH : LOW);
#endif
}
void CIO::POCSAG_pin(bool on)
{
// Use D-Star and DMR LED to indicate POCSAG mode
// TODO: add a separate LED pin for POCSAG mode
#if defined(USE_ALTERNATE_POCSAG_LEDS)
digitalWrite(PIN_DSTAR_LED, on ? HIGH : LOW);
digitalWrite(PIN_DMR_LED, on ? HIGH : LOW);
#endif
// TODO: add a separate LED pin for POCSAG mode
}
void CIO::PTT_pin(bool on)

@ -644,15 +644,21 @@ void CIO::P25_pin(bool on)
void CIO::NXDN_pin(bool on)
{
#if defined(USE_ALTERNATE_NXDN_LEDS)
GPIO_WriteBit(PORT_YSF_LED, PIN_YSF_LED, on ? Bit_SET : Bit_RESET);
GPIO_WriteBit(PORT_P25_LED, PIN_P25_LED, on ? Bit_SET : Bit_RESET);
#else
GPIO_WriteBit(PORT_NXDN_LED, PIN_NXDN_LED, on ? Bit_SET : Bit_RESET);
#endif
}
void CIO::POCSAG_pin(bool on)
{
// Use D-Star and DMR LED to indicate POCSAG mode
// TODO: add a separate LED pin for POCSAG mode
#if defined(USE_ALTERNATE_POCSAG_LEDS)
GPIO_WriteBit(PORT_DSTAR_LED, PIN_DSTAR_LED, on ? Bit_SET : Bit_RESET);
GPIO_WriteBit(PORT_DMR_LED, PIN_DMR_LED, on ? Bit_SET : Bit_RESET);
#endif
// TODO: add a separate LED pin for POCSAG mode
}
void CIO::PTT_pin(bool on)

Loading…
Cancel
Save

Powered by TurnKey Linux.