log_uart_api.h File Reference

This file provides user interface for log uart base on the functionalities provided by Realtek periphera. More...

`#include "device.h"`
`#include "serial_api.h"`
`#include "hal_log_uart.h"`

## Ameba1 Only

typedef void(* | loguart_irq_handler) (uint32_t id, LOG_UART_INT_ID event)
typedef struct log_uart_s | log_uart_t
int32_t | log_uart_init (log_uart_t *obj, int baudrate, int data_bits, SerialParity parity, int stop_bits)
| Initialize Realtek log uart. Initialize the required parts of the log uart. i.e. baudrate, data bits, parity, etc. More...
void | log_uart_free (log_uart_t *obj)
| Release the resources related to Realtek log uart. More...
void | log_uart_baud (log_uart_t *obj, int baudrate)
| Set the baud rate of log uart. More...
void | log_uart_format (log_uart_t *obj, int data_bits, SerialParity parity, int stop_bits)
| Set parameters for log uart. including data bits, parity type and stop bits. More...
void | log_uart_irq_handler (log_uart_t *obj, loguart_irq_handler handler, uint32_t id)
| Set irq handler for log uart. More...
void | log_uart_irq_set (log_uart_t *obj, LOG_UART_INT_ID irq, uint32_t enable)
| Enable/disable the specific irq indication ID. More...
char | log_uart_getc (log_uart_t *obj)
| Read one character from log uart. This function will block untill the log uart gets something to read. More...
void | log_uart_putc (log_uart_t *obj, char c)
| Write one character to log uart. This function will block untill the data is successfully written to log uart. More...
int | log_uart_readable (log_uart_t *obj)
| Check whether log uart is ready to read data. More...
int | log_uart_writable (log_uart_t *obj)
| Check whether log uart is ready to write data. More...
void | log_uart_clear (log_uart_t *obj)
| Clear both data at log uart This function will clear data in both TX FIFO and RX FIFO of log uart. More...
void | log_uart_clear_tx (log_uart_t *obj)
| Clear TX FIFO of log uart. More...
void | log_uart_clear_rx (log_uart_t *obj)
| Clear RX FIFO of log uart. More...
void | log_uart_break_set (log_uart_t *obj)
| Set break control for log uart. More...
void | log_uart_break_clear (log_uart_t *obj)
| Clear break control for log uart. More...
void | log_uart_tx_comp_handler (log_uart_t *obj, void *handler, uint32_t id)
| Set the handler for complete TX. More...
void | log_uart_rx_comp_handler (log_uart_t *obj, void *handler, uint32_t id)
| Set the handler for complete RX. More...
void | log_uart_line_status_handler (log_uart_t *obj, void *handler, uint32_t id)
| Set the handler for line status. More...
int32_t | log_uart_recv (log_uart_t *obj, char *prxbuf, uint32_t len, uint32_t timeout_ms)
| Read data from log uart in blocking mode. More...
int32_t | log_uart_send (log_uart_t *obj, char *ptxbuf, uint32_t len, uint32_t timeout_ms)
| Send data to log uart in blocking mode. More...
int32_t | log_uart_recv_stream (log_uart_t *obj, char *prxbuf, uint32_t len)
| Read data from log uart in interrupt mode(Non-blocking) More...
int32_t | log_uart_send_stream (log_uart_t *obj, char *ptxbuf, uint32_t len)
| Send data to log uart in interrupt mode(Non-blocking) More...
int32_t | log_uart_recv_stream_timeout (log_uart_t *obj, char *prxbuf, uint32_t len, uint32_t timeout_ms, void *force_cs)
| Read data from log uart with a given timeout in interrupt mode(Non-blocking) More...
int32_t | log_uart_send_stream_abort (log_uart_t *obj)
| Abort interrupt mode of sending data. More...
int32_t | log_uart_recv_stream_abort (log_uart_t *obj)
| Abort interrupt mode of receiving data. More...
void | log_uart_disable (log_uart_t *obj)
| Disable log uart. More...
void | log_uart_enable (log_uart_t *obj)
| Enable log uart. More...
uint8_t | log_uart_raed_lsr (log_uart_t *obj)
| Read Line-Status register. More...
uint8_t | log_uart_raed_msr (log_uart_t *obj)
| Read Modem-Status register. More...

## Detailed Description

This file provides user interface for log uart base on the functionalities provided by Realtek periphera.

Author

Version

Attention

This module is a confidential and proprietary property of RealTek and possession or use of this module requires written permission of RealTek.

Copyright(c) 2016, Realtek Semiconductor Corporation. All rights reserved.