Skip to content

Commit

Permalink
rx,tx, WioE5 mini dev bioard, change to single LED
Browse files Browse the repository at this point in the history
  • Loading branch information
olliw42 committed Apr 7, 2024
1 parent 26b85e6 commit 4aca11f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
1 change: 1 addition & 0 deletions mLRS/Common/hal/hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ In tx-hal files:
#define DEVICE_HAS_ESP_WIFI_BRIDGE_ON_SERIAL // board has ESP32 with RESET,GPIO support, on Serial port
#define DEVICE_HAS_ESP_WIFI_BRIDGE_ON_SERIAL2 // board has ESP32 with RESET,GPIO support, on Serial2 port
#define DEVICE_HAS_SYSTEMBOOT // board has a means to invoke the system bootloader on startup
#define DEVICE_HAS_SINGLE_LED // board has only one LED
In rx-hal files:
Expand Down
7 changes: 1 addition & 6 deletions mLRS/Common/hal/rx-hal-WioE5-Grove-wle5jc.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// no bind button (is available via the BOOT solder pad located on the bottom side = pin PB13 = pin 24 on WioE5)
// no out port (not available, to make available change this hal accordingly)

#define DEVICE_HAS_SINGLE_LED
#define DEVICE_HAS_SERIAL_OR_DEBUG // is selected by DEBUG_ENABLED define
//#define DEVICE_HAS_OUT

Expand Down Expand Up @@ -177,19 +178,13 @@ bool button_pressed(void)

//-- LEDs

#define LED_GREEN IO_PB4
#define LED_RED IO_PA9

void leds_init(void)
{
gpio_init(LED_GREEN, IO_MODE_OUTPUT_PP_LOW, IO_SPEED_DEFAULT);
gpio_init(LED_RED, IO_MODE_OUTPUT_PP_HIGH, IO_SPEED_DEFAULT);
}

void led_green_off(void) { gpio_low(LED_GREEN); }
void led_green_on(void) { gpio_high(LED_GREEN); }
void led_green_toggle(void) { gpio_toggle(LED_GREEN); }

void led_red_off(void) { gpio_high(LED_RED); }
void led_red_on(void) { gpio_low(LED_RED); }
void led_red_toggle(void) { gpio_toggle(LED_RED); }
Expand Down
6 changes: 2 additions & 4 deletions mLRS/Common/hal/rx-hal-WioE5-Mini-wle5jc.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//-------------------------------------------------------

#define DEVICE_HAS_OUT
#define DEVICE_HAS_SINGLE_LED


//-- Timers, Timing, EEPROM, and such stuff
Expand Down Expand Up @@ -168,6 +169,7 @@ bool button_pressed(void)


//-- LEDs
// we keep the green LED stuff in case a user wants it

#define LED_GREEN IO_PA15
#define LED_RED IO_PB5
Expand All @@ -179,10 +181,6 @@ void leds_init(void)

// pin IO_PB15 must be floating, is used as artificial pad for green LED!
gpio_init(IO_PB15, IO_MODE_Z, IO_SPEED_DEFAULT);

// artificial GND for R+Diode mod, ONLY temporary
// this is dirty! we do it here in leds_init() to ensure it is called
gpio_init(IO_PA0, IO_MODE_OUTPUT_PP_LOW, IO_SPEED_DEFAULT);
}

void led_green_off(void) { gpio_low(LED_GREEN); }
Expand Down
2 changes: 2 additions & 0 deletions mLRS/Common/hal/tx-hal-WioE5-Mini-wle5jc.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
//#define DEVICE_HAS_IN
#define DEVICE_HAS_IN_ON_JRPIN5_RX
#define DEVICE_HAS_DEBUG_SWUART
#define DEVICE_HAS_SINGLE_LED
//#define DEVICE_HAS_ESP_WIFI_BRIDGE_ON_SERIAL


Expand Down Expand Up @@ -208,6 +209,7 @@ bool button_pressed(void)


//-- LEDs
// we keep the green LED stuff in case a user wants it

#define LED_GREEN IO_PA15
#define LED_RED IO_PB5
Expand Down

0 comments on commit 4aca11f

Please sign in to comment.