Go to the documentation of this file.
40 #ifndef ADUCM3029_UART_H_
41 #define ADUCM3029_UART_H_
47 #include <drivers/uart/adi_uart.h>
55 #define NO_OS_UART_MAX_BYTES 1024u
#define NO_OS_UART_MAX_BYTES
Definition: aducm3029_uart.h:55
struct no_os_op_desc read_desc
Definition: aducm3029_uart.h:154
enum no_os_uart_parity parity
Definition: no_os_uart.h:122
void lf256fifo_remove(struct lf256fifo *fifo)
@ HW_ERR_RX_CHAN_DMA_INVALID_DESCR
Definition: aducm3029_uart.h:88
Header file of UART driver for ADuCM302x.
@ NO_OS_EVT_UART_RX_COMPLETE
Definition: no_os_irq.h:70
struct no_os_callback_desc rx_callback
Definition: aducm3029_uart.h:158
Structure describing a callback to be registered.
Definition: no_os_irq.h:136
Header file of IRQ interface.
int32_t no_os_irq_register_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc)
Register a callback to handle the irq events.
Definition: no_os_irq.c:94
int lf256fifo_init(struct lf256fifo **)
enum no_os_uart_size size
Definition: no_os_uart.h:120
ADI_UART_HANDLE uart_handler
Definition: aducm3029_uart.h:136
uint32_t baud_rate
Definition: no_os_uart.h:142
It stores the state of a operation.
Definition: aducm3029_uart.h:120
void uart_rx_callback(void *context)
Definition: aducm3029_uart.c:89
uint8_t * buff
Definition: aducm3029_uart.h:124
uint32_t baud_rate
Definition: aducm3029_uart.h:105
ADI_RNG_HANDLE dev
Definition: aducm3029_trng.c:75
uint8_t * adi_uart_buffer
Definition: aducm3029_uart.h:145
uint8_t device_id
Definition: no_os_uart.h:136
@ HW_ERR_RX_CHAN_DMA_BUS_FAULT
Definition: aducm3029_uart.h:84
enum no_os_irq_peripheral peripheral
Definition: no_os_irq.h:154
bool is_nonblocking
Definition: aducm3029_uart.h:122
const struct no_os_baud_desc baud_rates_26MHz[NO_OS_BAUDS_NB]
Definition: aducm3029_uart.c:66
bool callback_enabled
Definition: aducm3029_uart.h:140
enum UART_ERROR errors
Definition: aducm3029_uart.h:138
@ HW_ERR_RX_CHAN_DMA_UNKNOWN_ERROR
Definition: aducm3029_uart.h:92
const struct no_os_uart_platform_ops aducm_uart_ops
aducm3029 platform specific UART platform ops structure
Definition: aducm3029_uart.c:506
int lf256fifo_read(struct lf256fifo *, uint8_t *)
#define no_os_min(x, y)
Definition: no_os_util.h:63
#define NO_OS_TRNG_PRESCALER
Definition: aducm3029_trng.c:58
Stucture holding the UART descriptor.
Definition: no_os_uart.h:134
TRNG Descriptor.
Definition: aducm3029_trng.c:67
Header file of true random number generator.
bool asynchronous_rx
Definition: no_os_uart.h:116
const struct no_os_irq_platform_ops aducm_irq_ops
Aducm3029 platform specific IRQ platform ops structure.
Definition: aducm3029_irq.c:556
void * extra
Definition: no_os_uart.h:145
@ BAD_INPUT_PARAMETERS
Definition: aducm3029_uart.h:72
void * ctx
Definition: no_os_irq.h:148
int32_t no_os_trng_fill_buffer(struct no_os_trng_desc *desc, uint8_t *buff, uint32_t len)
Fill buffer with random numbers.
Definition: aducm3029_trng.c:153
@ WAITING_FOR_CALLBACK
Definition: aducm3029_uart.h:74
int32_t no_os_irq_unregister_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc)
Unregisters a generic IRQ handling function.
Definition: no_os_irq.c:114
@ NO_ERR
Definition: aducm3029_uart.h:67
UART_ERROR
Values returned by no_os_uart_get_errors. Multiple values can be set.
Definition: aducm3029_uart.h:65
Init parameter for TRNG.
Definition: no_os_trng.h:64
Header file of IRQ driver for ADuCM302x.
const struct no_os_irq_platform_ops * platform_ops
Definition: no_os_irq.h:107
struct lf256fifo * rx_fifo
Definition: no_os_uart.h:140
int lf256fifo_write(struct lf256fifo *, uint8_t)
#define NO_OS_UNUSED_PARAM(x)
Definition: no_os_util.h:115
Structure of an element from baud_rates_26MHz. The baud rate is calculated with the formula: Baudrate...
Definition: aducm3029_uart.h:103
int32_t no_os_irq_ctrl_init(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Initialize the IRQ interrupts.
Definition: no_os_irq.c:51
void * handle
Definition: no_os_irq.h:156
void(* callback)(void *context)
Definition: no_os_irq.h:138
uint32_t adi_uart_buffer_offset
Definition: aducm3029_uart.h:150
uint8_t div_m
Definition: aducm3029_uart.h:109
uint32_t baud_rate
Definition: no_os_uart.h:118
uint8_t osr
Definition: aducm3029_uart.h:113
int32_t no_os_trng_init(struct no_os_trng_desc **desc, struct no_os_trng_init_param *param)
Initialize descriptor.
Definition: aducm3029_trng.c:117
enum no_os_uart_stop stop
Definition: no_os_uart.h:124
uint32_t pending
Definition: aducm3029_uart.h:126
enum no_os_irq_event event
Definition: no_os_irq.h:152
@ NO_OS_UART_PAR_EVEN
Definition: no_os_uart.h:85
uint32_t dev_mem[(ADI_RNG_MEMORY_SIZE+3)/4]
Definition: aducm3029_trng.c:73
struct no_os_op_desc write_desc
Definition: aducm3029_uart.h:152
uint16_t div_n
Definition: aducm3029_uart.h:107
int32_t no_os_uart_read_nonblocking(struct no_os_uart_desc *desc, uint8_t *data, uint32_t bytes_number)
Read data from UART non-blocking.
Definition: no_os_uart.c:150
uint32_t irq_id
Definition: no_os_uart.h:138
@ HW_ERR_PARITY
Definition: aducm3029_uart.h:78
#define NULL
Definition: wrapper.h:64
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:110
@ HW_ERR_TX_CHAN_DMA_BUS_FAULT
Definition: aducm3029_uart.h:86
#define NO_OS_TRNG_CNT_VAL
Definition: aducm3029_trng.c:56
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:103
@ NO_OS_UART_PAR_NO
Definition: no_os_uart.h:77
@ NO_OS_UART_IRQ
Definition: no_os_irq.h:87
int32_t no_os_irq_ctrl_remove(struct no_os_irq_ctrl_desc *desc)
Free the resources allocated by no_os_irq_ctrl_init().
Definition: no_os_irq.c:76
uint8_t device_id
Definition: no_os_uart.h:112
#define NO_OS_CLK_FREQ
Definition: aducm3029_uart.c:55
struct no_os_irq_ctrl_desc * nvic
Definition: aducm3029_uart.h:156
int32_t no_os_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific interrupt.
Definition: no_os_irq.c:183
@ NO_OS_UART_PAR_ODD
Definition: no_os_uart.h:83
const struct no_os_uart_platform_ops aducm_uart_ops
aducm3029 platform specific UART platform ops structure
Definition: aducm3029_uart.c:506
Header file of UART interface.
@ HW_ERR_TX_CHAN_DMA_UNKNOWN_ERROR
Definition: aducm3029_uart.h:94
#define NO_OS_NUM_UART_DEVICES
Definition: aducm3029_uart.c:62
uint16_t div_c
Definition: aducm3029_uart.h:111
@ HW_ERR_OVERRUN
Definition: aducm3029_uart.h:80
Header file of utility functions.
#define NO_OS_BAUDS_NB
Definition: aducm3029_uart.c:56
int32_t no_os_irq_disable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Disable specific interrupt.
Definition: no_os_irq.c:200
@ BREAK_INTERRUPT
Definition: aducm3029_uart.h:82
@ HW_ERR_TX_CHAN_DMA_INVALID_DESCR
Definition: aducm3029_uart.h:90
Definition: no_os_irq.h:119
Stores specific parameter needed by the UART driver for internal operations.
Definition: aducm3029_uart.h:134
@ NO_OS_UART_CS_8
Definition: no_os_uart.h:66
#define NO_OS_ADUCM_TRNG_DEVICE_ID
Definition: aducm3029_trng.c:60
@ HW_ERR_FRAMING
Definition: aducm3029_uart.h:76
void no_os_trng_remove(struct no_os_trng_desc *desc)
Free resources allocated in descriptor.
Definition: aducm3029_trng.c:138