Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove hardcoded aux1 debug hack #5668

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions radio/src/serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,20 +486,10 @@ void serialInit(uint8_t port_nr, int mode)

void initSerialPorts()
{
#if defined(DEBUG)
// AUX1 and serialPortStates was already initialized early in DEBUG config
for (uint8_t port_nr = 0; port_nr < MAX_AUX_SERIAL; port_nr++) {
if (port_nr != SP_AUX1) {
auto mode = getSerialPortMode(port_nr);
serialInit(port_nr, mode);
}
}
#else
for (uint8_t port_nr = 0; port_nr < MAX_AUX_SERIAL; port_nr++) {
auto mode = getSerialPortMode(port_nr);
serialInit(port_nr, mode);
}
#endif
}

int serialGetMode(uint8_t port_nr)
Expand Down
5 changes: 0 additions & 5 deletions radio/src/targets/horus/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,6 @@ void boardInit()

__enable_irq();

#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

TRACE("\nHorus board started :)");
TRACE("RCC->CSR = %08x", RCC->CSR);

Expand Down
5 changes: 0 additions & 5 deletions radio/src/targets/nv14/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ void boardInit()
// detect NV14 vs EL18
hardwareOptions.pcbrev = boardGetPcbRev();

#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

TRACE("\n%s board started :)",
hardwareOptions.pcbrev == PCBREV_NV14 ?
"NV14" : "EL18");
Expand Down
5 changes: 0 additions & 5 deletions radio/src/targets/pl18/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ void boardInit()
__enable_irq();
#endif

#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

TRACE("\nPL18 board started :)");
delay_ms(10);
TRACE("RCC->CSR = %08x", RCC->CSR);
Expand Down
5 changes: 0 additions & 5 deletions radio/src/targets/taranis/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,6 @@ void boardInit()
ws2812_update(&_led_timer);
#endif

#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

#if defined(HAPTIC)
hapticInit();
#endif
Expand Down