diff --git a/src/main/blackbox/blackbox_io.c b/src/main/blackbox/blackbox_io.c index 8f7d81ac2..44bd59cbd 100644 --- a/src/main/blackbox/blackbox_io.c +++ b/src/main/blackbox/blackbox_io.c @@ -650,7 +650,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) { - mspAllocateSerialPorts(&masterConfig.serialConfig); + mspSerialAllocatePorts(&masterConfig.serialConfig); } break; default: diff --git a/src/main/fc/mw.c b/src/main/fc/mw.c index 5dc03e2fb..6f2a48e76 100644 --- a/src/main/fc/mw.c +++ b/src/main/fc/mw.c @@ -410,7 +410,7 @@ void mwDisarm(void) void releaseSharedTelemetryPorts(void) { serialPort_t *sharedPort = findSharedSerialPort(TELEMETRY_FUNCTION_MASK, FUNCTION_MSP); while (sharedPort) { - mspReleasePortIfAllocated(sharedPort); + mspSerialReleasePortIfAllocated(sharedPort); sharedPort = findNextSharedSerialPort(TELEMETRY_FUNCTION_MASK, FUNCTION_MSP); } } @@ -443,7 +443,7 @@ void mwArm(void) if (feature(FEATURE_BLACKBOX)) { serialPort_t *sharedBlackboxAndMspPort = findSharedSerialPort(FUNCTION_BLACKBOX, FUNCTION_MSP); if (sharedBlackboxAndMspPort) { - mspReleasePortIfAllocated(sharedBlackboxAndMspPort); + mspSerialReleasePortIfAllocated(sharedBlackboxAndMspPort); } startBlackbox(); } @@ -702,7 +702,7 @@ void processRx(void) } else { // the telemetry state must be checked immediately so that shared serial ports are released. telemetryCheckState(); - mspAllocateSerialPorts(&masterConfig.serialConfig); + mspSerialAllocatePorts(&masterConfig.serialConfig); } } #endif diff --git a/src/main/io/serial.c b/src/main/io/serial.c index 83eb4260e..e5ef5da9f 100644 --- a/src/main/io/serial.c +++ b/src/main/io/serial.c @@ -433,7 +433,7 @@ void handleSerial(void) } #endif - mspProcess(); + mspSerialProcess(); } void waitForSerialPortToFinishTransmitting(serialPort_t *serialPort) diff --git a/src/main/io/serial_msp.c b/src/main/io/serial_msp.c index 50ee576d6..d00d5d8ff 100644 --- a/src/main/io/serial_msp.c +++ b/src/main/io/serial_msp.c @@ -428,7 +428,7 @@ static void resetMspPort(mspPort_t *mspPortToReset, serialPort_t *serialPort) mspPortToReset->port = serialPort; } -void mspAllocateSerialPorts(serialConfig_t *serialConfig) +void mspSerialAllocatePorts(serialConfig_t *serialConfig) { UNUSED(serialConfig); @@ -455,7 +455,7 @@ void mspAllocateSerialPorts(serialConfig_t *serialConfig) } } -void mspReleasePortIfAllocated(serialPort_t *serialPort) +void mspSerialReleasePortIfAllocated(serialPort_t *serialPort) { uint8_t portIndex; for (portIndex = 0; portIndex < MAX_MSP_PORT_COUNT; portIndex++) { @@ -467,7 +467,7 @@ void mspReleasePortIfAllocated(serialPort_t *serialPort) } } -void mspInit(serialConfig_t *serialConfig) +void mspSerialInit(serialConfig_t *serialConfig) { // calculate used boxes based on features and fill availableBoxes[] array memset(activeBoxIds, 0xFF, sizeof(activeBoxIds)); @@ -566,7 +566,7 @@ void mspInit(serialConfig_t *serialConfig) #endif memset(mspPorts, 0x00, sizeof(mspPorts)); - mspAllocateSerialPorts(serialConfig); + mspSerialAllocatePorts(serialConfig); } #define IS_ENABLED(mask) (mask == 0 ? 0 : 1) @@ -1959,7 +1959,7 @@ STATIC_UNIT_TESTED void setCurrentPort(mspPort_t *port) mspSerialPort = currentPort->port; } -void mspProcess(void) +void mspSerialProcess(void) { uint8_t portIndex; mspPort_t *candidatePort; diff --git a/src/main/io/serial_msp.h b/src/main/io/serial_msp.h index 114e94ab8..a1c7cdbdf 100644 --- a/src/main/io/serial_msp.h +++ b/src/main/io/serial_msp.h @@ -44,8 +44,8 @@ typedef struct mspPort_s { } mspPort_t; struct serialConfig_s; -void mspInit(struct serialConfig_s *serialConfig); -void mspProcess(void); -void mspAllocateSerialPorts(struct serialConfig_s *serialConfig); +void mspSerialInit(struct serialConfig_s *serialConfig); +void mspSerialProcess(void); +void mspSerialAllocatePorts(struct serialConfig_s *serialConfig); struct serialPort_s; -void mspReleasePortIfAllocated(struct serialPort_s *serialPort); +void mspSerialReleasePortIfAllocated(struct serialPort_s *serialPort); diff --git a/src/main/main.c b/src/main/main.c index 98d06a167..a5a3facb3 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -504,7 +504,7 @@ void init(void) imuInit(); - mspInit(&masterConfig.serialConfig); + mspSerialInit(&masterConfig.serialConfig); #ifdef USE_CLI cliInit(&masterConfig.serialConfig);