1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00
betaflight/src/serial_common.h
Dominic Clifton a7e4c859bd decouple cli/msp from each other. relocated non-msp code into
serial_common.c/h. decouple runtime_config from serial ports.  decouple
buzzer from serial ports.  decouple opening of the main serial port from
the msp code.  decouple serial rx providers from runtime_config.  rename
core_t to serialPorts_t since it only contained serial ports.  It's now
clear which files use serial ports based on the header files they
include.
2014-04-19 01:01:31 +01:00

24 lines
886 B
C

#pragma once
typedef struct serialPorts_s {
serialPort_t *mainport;
serialPort_t *gpsport;
serialPort_t *telemport;
serialPort_t *rcvrport;
} serialPorts_t;
typedef struct serialConfig_s {
uint32_t port1_baudrate;
uint32_t softserial_baudrate; // shared by both soft serial ports
uint8_t softserial_1_inverted; // use inverted softserial input and output signals on port 1
uint8_t softserial_2_inverted; // use inverted softserial input and output signals on port 2
uint8_t reboot_character; // which byte is used to reboot. Default 'R', could be changed carefully to something else.
} serialConfig_t;
extern serialPorts_t serialPorts;
void resetMainSerialPort(void);
void openMainSerialPort(uint32_t baudrate);
void evaluateOtherData(uint8_t sr);
void handleSerial(void);