/**
 * Writes the specified character to the serial port.
 * The call will block until the character is written.
 *
 * Lua Params:
 * port - the serial port to write
 *        (SERIAL_USB, SERIAL_GPS, SERIAL_TELEMETRY, SERIAL_WIRELESS, SERIAL_AUX)
 * char - the character to write.
 *
 * Lua Returns:
 * no return values (nil)
 *
 */
int Lua_WriteSerialChar(lua_State *L)
{
    if (lua_gettop(L) >= 2) {
        int serialPort = lua_tointeger(L,1);
        Serial *serial = get_serial(serialPort);
        if (serial) {
            char c = (char)lua_tonumber(L, 2);
            serial->put_c((char)c);
        }
    }
    return 0;
}