Go to the documentation of this file.
34 #ifndef ADUCM3029_UART_H_
35 #define ADUCM3029_UART_H_
41 #include <drivers/uart/adi_uart.h>
49 #define NO_OS_UART_MAX_BYTES 1024u
#define NO_OS_UART_MAX_BYTES
Definition: aducm3029_uart.h:49
struct no_os_op_desc read_desc
Definition: aducm3029_uart.h:148
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:82
Header file of UART driver for ADuCM302x.
@ NO_OS_EVT_UART_RX_COMPLETE
Definition: no_os_irq.h:64
struct no_os_callback_desc rx_callback
Definition: aducm3029_uart.h:152
Structure describing a callback to be registered.
Definition: no_os_irq.h:142
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:92
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:130
uint32_t baud_rate
Definition: no_os_uart.h:144
It stores the state of a operation.
Definition: aducm3029_uart.h:114
void uart_rx_callback(void *context)
Definition: aducm3029_uart.c:84
uint8_t * buff
Definition: aducm3029_uart.h:118
uint32_t baud_rate
Definition: aducm3029_uart.h:99
uint8_t * adi_uart_buffer
Definition: aducm3029_uart.h:139
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
uint8_t device_id
Definition: no_os_uart.h:138
@ HW_ERR_RX_CHAN_DMA_BUS_FAULT
Definition: aducm3029_uart.h:78
enum no_os_irq_peripheral peripheral
Definition: no_os_irq.h:150
bool is_nonblocking
Definition: aducm3029_uart.h:116
const struct no_os_baud_desc baud_rates_26MHz[NO_OS_BAUDS_NB]
Definition: aducm3029_uart.c:61
bool callback_enabled
Definition: aducm3029_uart.h:134
enum UART_ERROR errors
Definition: aducm3029_uart.h:132
@ HW_ERR_RX_CHAN_DMA_UNKNOWN_ERROR
Definition: aducm3029_uart.h:86
const struct no_os_uart_platform_ops aducm_uart_ops
aducm3029 platform specific UART platform ops structure
Definition: aducm3029_uart.c:501
int lf256fifo_read(struct lf256fifo *, uint8_t *)
#define no_os_min(x, y)
Definition: no_os_util.h:59
Stucture holding the UART descriptor.
Definition: no_os_uart.h:134
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:551
void * extra
Definition: no_os_uart.h:147
@ BAD_INPUT_PARAMETERS
Definition: aducm3029_uart.h:66
void * ctx
Definition: no_os_irq.h:146
@ WAITING_FOR_CALLBACK
Definition: aducm3029_uart.h:68
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:112
@ NO_ERR
Definition: aducm3029_uart.h:61
UART_ERROR
Values returned by no_os_uart_get_errors. Multiple values can be set.
Definition: aducm3029_uart.h:59
Header file of IRQ driver for ADuCM302x.
const struct no_os_irq_platform_ops * platform_ops
Definition: no_os_irq.h:111
struct lf256fifo * rx_fifo
Definition: no_os_uart.h:142
int lf256fifo_write(struct lf256fifo *, uint8_t)
Structure of an element from baud_rates_26MHz. The baud rate is calculated with the formula: Baudrate...
Definition: aducm3029_uart.h:97
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:45
void * handle
Definition: no_os_irq.h:152
void(* callback)(void *context)
Definition: no_os_irq.h:144
uint32_t adi_uart_buffer_offset
Definition: aducm3029_uart.h:144
uint8_t div_m
Definition: aducm3029_uart.h:103
uint32_t baud_rate
Definition: no_os_uart.h:118
uint8_t osr
Definition: aducm3029_uart.h:107
enum no_os_uart_stop stop
Definition: no_os_uart.h:124
uint32_t pending
Definition: aducm3029_uart.h:120
enum no_os_irq_event event
Definition: no_os_irq.h:148
@ NO_OS_UART_PAR_EVEN
Definition: no_os_uart.h:85
struct no_os_op_desc write_desc
Definition: aducm3029_uart.h:146
uint16_t div_n
Definition: aducm3029_uart.h:101
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:170
uint32_t irq_id
Definition: no_os_uart.h:140
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
@ HW_ERR_PARITY
Definition: aducm3029_uart.h:72
#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:80
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:107
@ NO_OS_UART_PAR_NO
Definition: no_os_uart.h:77
@ NO_OS_UART_IRQ
Definition: no_os_irq.h:86
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:71
uint8_t device_id
Definition: no_os_uart.h:112
#define NO_OS_CLK_FREQ
Definition: aducm3029_uart.c:50
struct no_os_irq_ctrl_desc * nvic
Definition: aducm3029_uart.h:150
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:181
@ 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:501
Header file of UART interface.
@ HW_ERR_TX_CHAN_DMA_UNKNOWN_ERROR
Definition: aducm3029_uart.h:88
#define NO_OS_NUM_UART_DEVICES
Definition: aducm3029_uart.c:57
uint16_t div_c
Definition: aducm3029_uart.h:105
@ HW_ERR_OVERRUN
Definition: aducm3029_uart.h:74
Header file of utility functions.
#define NO_OS_BAUDS_NB
Definition: aducm3029_uart.c:51
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:198
@ BREAK_INTERRUPT
Definition: aducm3029_uart.h:76
@ HW_ERR_TX_CHAN_DMA_INVALID_DESCR
Definition: aducm3029_uart.h:84
Definition: no_os_irq.h:123
Stores specific parameter needed by the UART driver for internal operations.
Definition: aducm3029_uart.h:128
@ NO_OS_UART_CS_8
Definition: no_os_uart.h:66
@ HW_ERR_FRAMING
Definition: aducm3029_uart.h:70