Skip to content

Commit

Permalink
fix(debug): don't initalise SP_AUX1 if not exist (#4962)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfeerick committed May 3, 2024
1 parent 0db8a92 commit e0aca64
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion radio/src/targets/horus/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void boardInit()

__enable_irq();

#if defined(DEBUG)
#if defined(DEBUG) && defined(AUX_SERIAL)
serialSetMode(SP_AUX1, UART_MODE_DEBUG); // indicate AUX1 is used
serialInit(SP_AUX1, UART_MODE_DEBUG); // early AUX1 init
#endif
Expand Down
2 changes: 1 addition & 1 deletion radio/src/targets/nv14/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void boardInit()
// detect NV14 vs EL18
hardwareOptions.pcbrev = boardGetPcbRev();

#if defined(DEBUG)
#if defined(DEBUG) && defined(AUX_SERIAL)
serialSetMode(SP_AUX1, UART_MODE_DEBUG); // indicate AUX1 is used
serialInit(SP_AUX1, UART_MODE_DEBUG); // early AUX1 init
#endif
Expand Down
1 change: 0 additions & 1 deletion radio/src/targets/nv14/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ void hapticOff();
void hapticOn(uint32_t pwmPercent);

// Second serial port driver
//#define AUX_SERIAL
#define DEBUG_BAUDRATE 115200
#define LUA_DEFAULT_BAUDRATE 115200

Expand Down
2 changes: 1 addition & 1 deletion radio/src/targets/pl18/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void boardInit()
__enable_irq();
#endif

#if defined(DEBUG)
#if defined(DEBUG) && defined(AUX_SERIAL)
serialSetMode(SP_AUX1, UART_MODE_DEBUG); // indicate AUX1 is used
serialInit(SP_AUX1, UART_MODE_DEBUG); // early AUX1 init
#endif
Expand Down
1 change: 0 additions & 1 deletion radio/src/targets/pl18/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ void hapticOff();
void hapticOn(uint32_t pwmPercent);

// Second serial port driver
//#define AUX_SERIAL
#define DEBUG_BAUDRATE 115200
#define LUA_DEFAULT_BAUDRATE 115200

Expand Down
2 changes: 1 addition & 1 deletion radio/src/targets/taranis/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void boardInit()
ws2812_update(&_led_timer);
#endif

#if defined(DEBUG)
#if defined(DEBUG) && defined(AUX_SERIAL)
serialSetMode(SP_AUX1, UART_MODE_DEBUG); // indicate AUX1 is used
serialInit(SP_AUX1, UART_MODE_DEBUG); // early AUX1 init
#endif
Expand Down

0 comments on commit e0aca64

Please sign in to comment.