NinjaFlight
|
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <platform.h>
#include "build_config.h"
#include "common/utils.h"
#include "drivers/system.h"
#include "drivers/serial.h"
#include "drivers/serial_softserial.h"
#include "drivers/serial_uart.h"
#include "drivers/serial_usb_vcp.h"
#include "io/serial.h"
#include "cli.h"
#include "serial_msp.h"
#include "config/config.h"
Data Structures | |
struct | findSerialPortConfigState_s |
struct | findSharedSerialPortState_s |
Macros | |
#define | BAUD_RATE_COUNT (sizeof(baudRates) / sizeof(baudRates[0])) |
#define | ALL_TELEMETRY_FUNCTIONS_MASK (FUNCTION_TELEMETRY_FRSKY | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_SMARTPORT | FUNCTION_TELEMETRY_LTM | FUNCTION_TELEMETRY_MAVLINK) |
#define | ALL_FUNCTIONS_SHARABLE_WITH_MSP (FUNCTION_BLACKBOX | ALL_TELEMETRY_FUNCTIONS_MASK) |
Typedefs | |
typedef struct findSerialPortConfigState_s | findSerialPortConfigState_t |
typedef struct findSharedSerialPortState_s | findSharedSerialPortState_t |
Variables | |
uint8_t | serialPortCount |
const uint32_t | baudRates [] = {0, 9600, 19200, 38400, 57600, 115200, 230400, 250000} |
#define ALL_FUNCTIONS_SHARABLE_WITH_MSP (FUNCTION_BLACKBOX | ALL_TELEMETRY_FUNCTIONS_MASK) |
#define ALL_TELEMETRY_FUNCTIONS_MASK (FUNCTION_TELEMETRY_FRSKY | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_SMARTPORT | FUNCTION_TELEMETRY_LTM | FUNCTION_TELEMETRY_MAVLINK) |
typedef struct findSerialPortConfigState_s findSerialPortConfigState_t |
typedef struct findSharedSerialPortState_s findSharedSerialPortState_t |
void closeSerialPort | ( | serialPort_t * | serialPort | ) |
portSharing_e determinePortSharing | ( | const struct serial_port_config * | portConfig, |
serialPortFunction_e | function | ||
) |
bool doesConfigurationUsePort | ( | const struct serial_config * | self, |
serialPortIdentifier_e | identifier | ||
) |
const struct serial_port_config* findNextSerialPortConfig | ( | const struct serial_config * | self, |
serialPortFunction_e | function | ||
) |
serialPort_t* findNextSharedSerialPort | ( | const struct serial_config * | self, |
uint16_t | functionMask, | ||
serialPortFunction_e | sharedWithFunction | ||
) |
const struct serial_port_config* findSerialPortConfig | ( | const struct serial_config * | self, |
serialPortFunction_e | function | ||
) |
serialPort_t* findSharedSerialPort | ( | const struct serial_config * | self, |
uint16_t | functionMask, | ||
serialPortFunction_e | sharedWithFunction | ||
) |
bool isSerialConfigValid | ( | const struct serial_config * | serialConfigToCheck | ) |
bool isSerialPortOpen | ( | const struct serial_port_config * | portConfig | ) |
bool isSerialPortShared | ( | const struct serial_port_config * | portConfig, |
uint16_t | functionMask, | ||
serialPortFunction_e | sharedWithFunction | ||
) |
baudRate_e lookupBaudRateIndex | ( | uint32_t | baudRate | ) |
serialPort_t* openSerialPort | ( | serialPortIdentifier_e | identifier, |
serialPortFunction_e | function, | ||
serialReceiveCallbackPtr | callback, | ||
uint32_t | baudRate, | ||
portMode_t | mode, | ||
portOptions_t | options | ||
) |
const struct serial_port_config* serialFindPortConfiguration | ( | const struct serial_config * | self, |
serialPortIdentifier_e | identifier | ||
) |
uint8_t serialGetAvailablePortCount | ( | void | ) |
void serialInit | ( | bool | softserialEnabled | ) |
bool serialIsPortAvailable | ( | serialPortIdentifier_e | identifier | ) |
void serialRemovePort | ( | serialPortIdentifier_e | identifier | ) |
void waitForSerialPortToFinishTransmitting | ( | serialPort_t * | serialPort | ) |
const uint32_t baudRates[] = {0, 9600, 19200, 38400, 57600, 115200, 230400, 250000} |
uint8_t serialPortCount |