PMSIS API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
uart.h File Reference

Data Structures

struct  pi_uart_conf
 UART device configuration structure. More...
 

Typedefs

typedef struct pi_cl_uart_req_s pi_cl_uart_req_t
 UART cluster request structure. More...
 

Enumerations

enum  pi_uart_stop_bits
 Stop bits enum. More...
 
enum  pi_uart_parity_mode
 Parity mode enum. More...
 
enum  pi_uart_word_size
 Bit length of each word. More...
 
enum  pi_uart_ioctl_cmd
 UART ioctl commands. More...
 

Functions

void pi_uart_conf_init (struct pi_uart_conf *conf)
 Initialize a UART configuration with default values. More...
 
int pi_uart_open (struct pi_device *device)
 Open a UART device. More...
 
void pi_uart_close (struct pi_device *device)
 Close an opened UART device. More...
 
int pi_uart_ioctl (struct pi_device *device, uint32_t cmd, void *arg)
 Dynamically change device configuration. More...
 
int pi_uart_write (struct pi_device *device, void *buffer, uint32_t size)
 Write data to an UART. More...
 
int pi_uart_read (struct pi_device *device, void *buffer, uint32_t size)
 Read data from an UART. More...
 
int pi_uart_write_byte (struct pi_device *device, uint8_t *byte)
 Write a byte to an UART. More...
 
int pi_uart_read_byte (struct pi_device *device, uint8_t *byte)
 Read a byte from an UART. More...
 
int pi_uart_write_async (struct pi_device *device, void *buffer, uint32_t size, pi_task_t *callback)
 Write data to an UART asynchronously. More...
 
int pi_uart_read_async (struct pi_device *device, void *buffer, uint32_t size, pi_task_t *callback)
 Read data from an UART asynchronously. More...
 
int pi_uart_write_timeout (struct pi_device *device, void *buffer, uint32_t size, uint32_t timeout_us)
 Write data to an UART synchronously, with timeout. More...
 
int pi_uart_read_timeout (struct pi_device *device, void *buffer, uint32_t size, uint32_t timeout_us)
 Read data from an UART synchronously, with timeout. More...
 
int pi_uart_write_byte_async (struct pi_device *device, uint8_t *byte, pi_task_t *callback)
 Write a byte to an UART asynchronously. More...
 
int pi_cl_uart_write (pi_device_t *device, void *buffer, uint32_t size, pi_cl_uart_req_t *req)
 Write data to an UART from cluster side. More...
 
int pi_cl_uart_write_byte (pi_device_t *device, uint8_t *byte, pi_cl_uart_req_t *req)
 Write a byte to an UART from cluster side. More...
 
static void pi_cl_uart_write_wait (pi_cl_uart_req_t *req)
 Wait until the specified UART cluster write request has finished. More...
 
int pi_cl_uart_read (pi_device_t *device, void *buffer, uint32_t size, pi_cl_uart_req_t *req)
 Read a byte from an UART from cluster side. More...
 
int pi_cl_uart_read_byte (pi_device_t *device, uint8_t *byte, pi_cl_uart_req_t *req)
 Read a byte from an UART. More...
 
static void pi_cl_uart_read_wait (pi_cl_uart_req_t *req)
 Wait until the specified UART cluster read request has finished. More...