NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
serial.h File Reference
#include "drivers/serial.h"
#include "target.h"
#include "../config/serial.h"
Include dependency graph for serial.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  serialPortUsage_s
 

Typedefs

typedef struct serialPortUsage_s serialPortUsage_t
 

Functions

void serialInit (bool softserialEnabled)
 
serialPort_tfindSharedSerialPort (const struct serial_config *self, uint16_t functionMask, serialPortFunction_e sharedWithFunction)
 
serialPort_tfindNextSharedSerialPort (const struct serial_config *self, uint16_t functionMask, serialPortFunction_e sharedWithFunction)
 
void serialRemovePort (serialPortIdentifier_e identifier)
 
uint8_t serialGetAvailablePortCount (void)
 
bool serialIsPortAvailable (serialPortIdentifier_e identifier)
 
bool isSerialConfigValid (const struct serial_config *serialConfig)
 
const struct serial_port_configserialFindPortConfiguration (const struct serial_config *self, serialPortIdentifier_e identifier)
 
bool doesConfigurationUsePort (const struct serial_config *self, serialPortIdentifier_e portIdentifier)
 
const struct serial_port_configfindSerialPortConfig (const struct serial_config *self, serialPortFunction_e function)
 
const struct serial_port_configfindNextSerialPortConfig (const struct serial_config *self, serialPortFunction_e function)
 
portSharing_e determinePortSharing (const struct serial_port_config *portConfig, serialPortFunction_e function)
 
bool isSerialPortShared (const struct serial_port_config *portConfig, uint16_t functionMask, serialPortFunction_e sharedWithFunction)
 
bool isSerialPortOpen (const struct serial_port_config *portConfig)
 
serialPort_topenSerialPort (serialPortIdentifier_e identifier, serialPortFunction_e function, serialReceiveCallbackPtr callback, uint32_t baudrate, portMode_t mode, portOptions_t options)
 
void closeSerialPort (serialPort_t *serialPort)
 
void waitForSerialPortToFinishTransmitting (serialPort_t *serialPort)
 
baudRate_e lookupBaudRateIndex (uint32_t baudRate)
 
void evaluateOtherData (serialPort_t *serialPort, uint8_t receivedChar)
 
void handleSerial (void)
 

Variables

const uint32_t baudRates []
 
const serialPortIdentifier_e serialPortIdentifiers [SERIAL_PORT_COUNT]
 

Typedef Documentation

Function Documentation

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  portIdentifier 
)

Here is the call graph for this function:

void evaluateOtherData ( serialPort_t serialPort,
uint8_t  receivedChar 
)
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 
)

Here is the call graph for this function:

const struct serial_port_config* findSerialPortConfig ( const struct serial_config self,
serialPortFunction_e  function 
)

Here is the call graph for this function:

serialPort_t* findSharedSerialPort ( const struct serial_config self,
uint16_t  functionMask,
serialPortFunction_e  sharedWithFunction 
)

Here is the call graph for this function:

void handleSerial ( void  )
bool isSerialConfigValid ( const struct serial_config serialConfig)
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 
)

Here is the call graph for this function:

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)

Here is the call graph for this function:

Variable Documentation

const uint32_t baudRates[]