Rename serial MSP functions in prep for converting to using streambuf

This commit is contained in:
Martin Budden 2016-09-10 16:22:44 +01:00
parent a303509920
commit a60cb8597f
6 changed files with 15 additions and 15 deletions

View File

@ -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:

View File

@ -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

View File

@ -433,7 +433,7 @@ void handleSerial(void)
}
#endif
mspProcess();
mspSerialProcess();
}
void waitForSerialPortToFinishTransmitting(serialPort_t *serialPort)

View File

@ -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;

View File

@ -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);

View File

@ -504,7 +504,7 @@ void init(void)
imuInit();
mspInit(&masterConfig.serialConfig);
mspSerialInit(&masterConfig.serialConfig);
#ifdef USE_CLI
cliInit(&masterConfig.serialConfig);