dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Hardware communication layer. More...

Files

file  pios_com.c
 COM layer functions.
 
file  pios_com_msg.c
 COM MSG layer functions.
 
file  pios_com.h
 COM layer functions header.
 
file  pios_com_msg.h
 COM MSG layer functions header.
 
file  pios_com_msg_priv.h
 COM MSG private definitions.
 
file  pios_com_priv.h
 COM private definitions.
 

Data Structures

struct  pios_com_driver
 

Typedefs

typedef uint16_t(* pios_com_callback )(uintptr_t context, uint8_t *buf, uint16_t buf_len, uint16_t *headroom, bool *task_woken)
 

Functions

uintptr_t PIOS_COM_GetDriverCtx (uintptr_t com_id)
 
int32_t PIOS_COM_ChangeBaud (uintptr_t com_id, uint32_t baud)
 
int32_t PIOS_COM_SendCharNonBlocking (uintptr_t com_id, char c)
 
int32_t PIOS_COM_SendChar (uintptr_t com_id, char c)
 
int32_t PIOS_COM_SendBufferNonBlocking (uintptr_t com_id, const uint8_t *buffer, uint16_t len)
 
int32_t PIOS_COM_SendBufferStallTimeout (uintptr_t com_id, const uint8_t *buffer, uint16_t len, uint32_t max_ms)
 
int32_t PIOS_COM_SendBuffer (uintptr_t com_id, const uint8_t *buffer, uint16_t len)
 
int32_t PIOS_COM_SendStringNonBlocking (uintptr_t com_id, const char *str)
 
int32_t PIOS_COM_SendString (uintptr_t com_id, const char *str)
 
int32_t PIOS_COM_SendFormattedStringNonBlocking (uintptr_t com_id, const char *format,...)
 
int32_t PIOS_COM_SendFormattedString (uintptr_t com_id, const char *format,...)
 
uint16_t PIOS_COM_ReceiveBuffer (uintptr_t com_id, uint8_t *buf, uint16_t buf_len, uint32_t timeout_ms)
 
bool PIOS_COM_Available (uintptr_t com_id)
 
uint16_t PIOS_COM_GetNumReceiveBytesPending (uintptr_t com_id)
 
int32_t PIOS_COM_MSG_Send (uintptr_t com_id, const uint8_t *msg, uint16_t msg_len)
 
uint16_t PIOS_COM_MSG_Receive (uintptr_t com_id, uint8_t *buf, uint16_t buf_len)
 
int32_t PIOS_COM_MSG_Init (uintptr_t *com_id, const struct pios_com_driver *driver, uintptr_t lower_id)
 
int32_t PIOS_COM_Init (uintptr_t *com_id, const struct pios_com_driver *driver, uintptr_t lower_id, uint16_t rx_buffer_len, uint16_t tx_buffer_len)
 

Detailed Description

Hardware communication layer.

Typedef Documentation

typedef uint16_t(* pios_com_callback)(uintptr_t context, uint8_t *buf, uint16_t buf_len, uint16_t *headroom, bool *task_woken)

Definition at line 41 of file pios_com.h.

Function Documentation

bool PIOS_COM_Available ( uintptr_t  com_id)
int32_t PIOS_COM_ChangeBaud ( uintptr_t  com_id,
uint32_t  baud 
)
uintptr_t PIOS_COM_GetDriverCtx ( uintptr_t  com_id)
uint16_t PIOS_COM_GetNumReceiveBytesPending ( uintptr_t  com_id)
int32_t PIOS_COM_Init ( uintptr_t *  com_id,
const struct pios_com_driver driver,
uintptr_t  lower_id,
uint16_t  rx_buffer_len,
uint16_t  tx_buffer_len 
)
int32_t PIOS_COM_MSG_Init ( uintptr_t *  com_id,
const struct pios_com_driver driver,
uintptr_t  lower_id 
)
uint16_t PIOS_COM_MSG_Receive ( uintptr_t  com_id,
uint8_t *  buf,
uint16_t  buf_len 
)
int32_t PIOS_COM_MSG_Send ( uintptr_t  com_id,
const uint8_t *  msg,
uint16_t  msg_len 
)
uint16_t PIOS_COM_ReceiveBuffer ( uintptr_t  com_id,
uint8_t *  buf,
uint16_t  buf_len,
uint32_t  timeout_ms 
)
int32_t PIOS_COM_SendBuffer ( uintptr_t  com_id,
const uint8_t *  buffer,
uint16_t  len 
)
int32_t PIOS_COM_SendBufferNonBlocking ( uintptr_t  com_id,
const uint8_t *  buffer,
uint16_t  len 
)
int32_t PIOS_COM_SendBufferStallTimeout ( uintptr_t  com_id,
const uint8_t *  buffer,
uint16_t  len,
uint32_t  max_ms 
)
int32_t PIOS_COM_SendChar ( uintptr_t  com_id,
char  c 
)
int32_t PIOS_COM_SendCharNonBlocking ( uintptr_t  com_id,
char  c 
)
int32_t PIOS_COM_SendFormattedString ( uintptr_t  com_id,
const char *  format,
  ... 
)
int32_t PIOS_COM_SendFormattedStringNonBlocking ( uintptr_t  com_id,
const char *  format,
  ... 
)
int32_t PIOS_COM_SendString ( uintptr_t  com_id,
const char *  str 
)
int32_t PIOS_COM_SendStringNonBlocking ( uintptr_t  com_id,
const char *  str 
)