static void cliEnter(void) { cliMode = 1; beginSerialPortFunction(cliPort, FUNCTION_CLI); setPrintfSerialPort(cliPort); cliPrint("\r\nEntering CLI Mode, type 'exit' to return, or 'help'\r\n"); cliPrompt(); }
void configureFrSkyTelemetryPort(void) { frskyPort = findOpenSerialPort(FUNCTION_TELEMETRY); if (frskyPort) { previousPortMode = frskyPort->mode; previousBaudRate = frskyPort->baudRate; //waitForSerialPortToFinishTransmitting(frskyPort); // FIXME locks up the system serialSetBaudRate(frskyPort, FRSKY_BAUDRATE); serialSetMode(frskyPort, FRSKY_INITIAL_PORT_MODE); beginSerialPortFunction(frskyPort, FUNCTION_TELEMETRY); } else { frskyPort = openSerialPort(FUNCTION_TELEMETRY, NULL, FRSKY_BAUDRATE, FRSKY_INITIAL_PORT_MODE, telemetryConfig->telemetry_inversion); // FIXME only need these values to reset the port if the port is shared previousPortMode = frskyPort->mode; previousBaudRate = frskyPort->baudRate; } }