Exemplo n.º 1
0
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();
}
Exemplo n.º 2
0
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;
    }
}