1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Add VCP driver (work in progress)

This commit is contained in:
Dominic Clifton 2014-06-02 01:54:25 +01:00
parent 294f09bc91
commit 3f8a6c0e20
39 changed files with 6912 additions and 7 deletions

View file

@ -40,6 +40,28 @@ typedef enum {
#define SERIAL_PORT_SCENARIO_MAX (SERIAL_PORT_SCENARIO_COUNT - 1)
extern const serialPortFunctionScenario_e serialPortScenarios[SERIAL_PORT_SCENARIO_COUNT];
#ifdef STM32F303xC
#define SERIAL_PORT_COUNT 5
typedef enum {
SERIAL_PORT_1 = 0,
SERIAL_PORT_2,
SERIAL_PORT_3,
SERIAL_PORT_4,
SERIAL_PORT_5
} serialPortIndex_e;
typedef enum {
SERIAL_PORT_USB_VCP = 0,
SERIAL_PORT_USART1,
SERIAL_PORT_USART2,
SERIAL_PORT_SOFTSERIAL1,
SERIAL_PORT_SOFTSERIAL2
} serialPortIdentifier_e;
#else
#define SERIAL_PORT_COUNT 4
typedef enum {
@ -48,7 +70,6 @@ typedef enum {
SERIAL_PORT_3,
SERIAL_PORT_4
} serialPortIndex_e;
typedef enum {
SERIAL_PORT_USART1 = 0,
SERIAL_PORT_USART2,
@ -56,6 +77,8 @@ typedef enum {
SERIAL_PORT_SOFTSERIAL2
} serialPortIdentifier_e;
#endif
// bitmask
typedef enum {
SPF_NONE = 0,
@ -88,7 +111,9 @@ typedef struct serialConfig_s {
uint8_t serial_port_2_scenario;
uint8_t serial_port_3_scenario;
uint8_t serial_port_4_scenario;
#ifdef STM32F303xC
uint8_t serial_port_5_scenario;
#endif
uint32_t msp_baudrate;
uint32_t cli_baudrate;
uint32_t gps_baudrate;