diff --git a/src/main/blackbox/blackbox_io.c b/src/main/blackbox/blackbox_io.c index 5f4088bbc8..894545bc00 100644 --- a/src/main/blackbox/blackbox_io.c +++ b/src/main/blackbox/blackbox_io.c @@ -614,7 +614,7 @@ void blackboxDeviceClose(void) * of time to shut down asynchronously, we're the only ones that know when to call it. */ if (blackboxPortSharing == PORTSHARING_SHARED) { - mspSerialAllocatePorts(&masterConfig.serialConfig); + mspSerialAllocatePorts(); } break; default: diff --git a/src/main/fc/mw.c b/src/main/fc/mw.c index 85c140ddad..f9a2e6fcac 100644 --- a/src/main/fc/mw.c +++ b/src/main/fc/mw.c @@ -718,7 +718,7 @@ void processRx(uint32_t currentTime) } else { // the telemetry state must be checked immediately so that shared serial ports are released. telemetryCheckState(); - mspSerialAllocatePorts(&masterConfig.serialConfig); + mspSerialAllocatePorts(); } } #endif diff --git a/src/main/io/serial_msp.c b/src/main/io/serial_msp.c index 079d02f4a2..0f95aa5b18 100644 --- a/src/main/io/serial_msp.c +++ b/src/main/io/serial_msp.c @@ -50,10 +50,8 @@ static void resetMspPort(mspPort_t *mspPortToReset, serialPort_t *serialPort) mspPortToReset->port = serialPort; } -void mspSerialAllocatePorts(serialConfig_t *serialConfig) +void mspSerialAllocatePorts(void) { - UNUSED(serialConfig); - serialPort_t *serialPort; uint8_t portIndex = 0; @@ -89,11 +87,11 @@ void mspSerialReleasePortIfAllocated(serialPort_t *serialPort) } } -void mspSerialInit(serialConfig_t *serialConfig) +void mspSerialInit(void) { mspInit(); - memset(mspPorts, 0x00, sizeof(mspPorts)); - mspSerialAllocatePorts(serialConfig); + memset(mspPorts, 0, sizeof(mspPorts)); + mspSerialAllocatePorts(); } static void setCurrentPort(mspPort_t *port) diff --git a/src/main/io/serial_msp.h b/src/main/io/serial_msp.h index f8af0c07c6..2d9d89afd8 100644 --- a/src/main/io/serial_msp.h +++ b/src/main/io/serial_msp.h @@ -54,8 +54,7 @@ extern struct bufWriter_s *writer; extern bool isRebootScheduled; -struct serialConfig_s; -void mspSerialInit(struct serialConfig_s *serialConfig); +void mspSerialInit(void); void mspSerialProcess(void); -void mspSerialAllocatePorts(struct serialConfig_s *serialConfig); +void mspSerialAllocatePorts(void); void mspSerialReleasePortIfAllocated(struct serialPort_s *serialPort); diff --git a/src/main/main.c b/src/main/main.c index 3f168f09d1..35fd9700c8 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -505,7 +505,7 @@ void init(void) imuInit(); - mspSerialInit(&masterConfig.serialConfig); + mspSerialInit(); #ifdef USE_CLI cliInit(&masterConfig.serialConfig); diff --git a/src/main/msp/msp_server_fc.c b/src/main/msp/msp_server_fc.c index 4934d67d72..2af9d6adf3 100755 --- a/src/main/msp/msp_server_fc.c +++ b/src/main/msp/msp_server_fc.c @@ -1898,7 +1898,7 @@ static bool processInCommand(void) return true; } -void mspProcessReceivedCommand() +void mspProcessReceivedCommand(void) { if (!(processOutCommand(currentPort->cmdMSP) || processInCommand())) { headSerialError(0);