NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
serial.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  serialPort_s
 
struct  serial_port_ops
 

Typedefs

typedef enum portMode_t portMode_t
 
typedef enum portOptions_t portOptions_t
 
typedef void(* serialReceiveCallbackPtr )(uint16_t data)
 
typedef struct serialPort_s serialPort_t
 

Enumerations

enum  portMode_t { MODE_RX = 1 << 0, MODE_TX = 1 << 1, MODE_RXTX = MODE_RX | MODE_TX }
 
enum  portOptions_t {
  SERIAL_NOT_INVERTED = 0 << 0, SERIAL_INVERTED = 1 << 0, SERIAL_STOPBITS_1 = 0 << 1, SERIAL_STOPBITS_2 = 1 << 1,
  SERIAL_PARITY_NO = 0 << 2, SERIAL_PARITY_EVEN = 1 << 2, SERIAL_UNIDIR = 0 << 3, SERIAL_BIDIR = 1 << 3
}
 

Functions

void serialWrite (serialPort_t *instance, uint8_t ch)
 
uint8_t serialRxBytesWaiting (serialPort_t *instance)
 
uint8_t serialTxBytesFree (serialPort_t *instance)
 
void serialWriteBuf (serialPort_t *instance, uint8_t *data, int count)
 
uint8_t serialRead (serialPort_t *instance)
 
void serialSetBaudRate (serialPort_t *instance, uint32_t baudRate)
 
void serialSetMode (serialPort_t *instance, portMode_t mode)
 
bool isSerialTransmitBufferEmpty (serialPort_t *instance)
 
void serialPrint (serialPort_t *instance, const char *str)
 
uint32_t serialGetBaudRate (serialPort_t *instance)
 
void serialWriteBufShim (void *instance, uint8_t *data, int count)
 
void serialBeginWrite (serialPort_t *instance)
 
void serialEndWrite (serialPort_t *instance)
 

Typedef Documentation

typedef enum portMode_t portMode_t
typedef struct serialPort_s serialPort_t
typedef void(* serialReceiveCallbackPtr)(uint16_t data)

Enumeration Type Documentation

enum portMode_t
Enumerator
MODE_RX 
MODE_TX 
MODE_RXTX 
Enumerator
SERIAL_NOT_INVERTED 
SERIAL_INVERTED 
SERIAL_STOPBITS_1 
SERIAL_STOPBITS_2 
SERIAL_PARITY_NO 
SERIAL_PARITY_EVEN 
SERIAL_UNIDIR 
SERIAL_BIDIR 

Function Documentation

bool isSerialTransmitBufferEmpty ( serialPort_t instance)
void serialBeginWrite ( serialPort_t instance)
void serialEndWrite ( serialPort_t instance)
uint32_t serialGetBaudRate ( serialPort_t instance)
void serialPrint ( serialPort_t instance,
const char *  str 
)

Here is the call graph for this function:

uint8_t serialRead ( serialPort_t instance)
uint8_t serialRxBytesWaiting ( serialPort_t instance)
void serialSetBaudRate ( serialPort_t instance,
uint32_t  baudRate 
)
void serialSetMode ( serialPort_t instance,
portMode_t  mode 
)
uint8_t serialTxBytesFree ( serialPort_t instance)
void serialWrite ( serialPort_t instance,
uint8_t  ch 
)
void serialWriteBuf ( serialPort_t instance,
uint8_t *  data,
int  count 
)

Here is the call graph for this function:

void serialWriteBufShim ( void *  instance,
uint8_t *  data,
int  count 
)

Here is the call graph for this function: