no-OS
maxim_uart.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef MAXIM_UART_H_
41 #define MAXIM_UART_H_
42 
43 #include "uart.h"
44 #include "no_os_irq.h"
45 #include "max32650.h"
46 
54 };
55 
61 };
62 
66 struct max_uart_desc {
69 };
70 
71 #endif
is_callback
bool is_callback
Definition: maxim_uart.c:61
no_os_uart_init_param::parity
enum no_os_uart_parity parity
Definition: no_os_uart.h:115
NO_OS_EVT_UART_RX_COMPLETE
@ NO_OS_EVT_UART_RX_COMPLETE
Definition: no_os_irq.h:70
no_os_uart_init_param::extra
void * extra
Definition: no_os_uart.h:119
no_os_callback_desc
Structure describing a callback to be registered.
Definition: no_os_irq.h:136
maxim_irq.h
Header file for maxim irq specifics.
NO_OS_UART_STOP_1_BIT
@ NO_OS_UART_STOP_1_BIT
Definition: no_os_uart.h:94
no_os_irq.h
Header file of IRQ interface.
no_os_irq_register_callback
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:82
lf256fifo_init
int lf256fifo_init(struct lf256fifo **)
no_os_uart_init_param::size
enum no_os_uart_size size
Definition: no_os_uart.h:113
max_uart_desc::nvic
struct no_os_irq_ctrl_desc * nvic
Definition: maxim_uart.h:68
no_os_uart_write
int32_t no_os_uart_write(struct no_os_uart_desc *desc, const uint8_t *data, uint32_t bytes_number)
Write data to UART device. Blocking function.
Definition: maxim_uart.c:116
maxim_uart.h
Header file of UART driver.
no_os_uart_desc::baud_rate
uint32_t baud_rate
Definition: no_os_uart.h:134
NO_OS_UART_CS_5
@ NO_OS_UART_CS_5
Definition: no_os_uart.h:60
no_os_uart_read
int32_t no_os_uart_read(struct no_os_uart_desc *desc, uint8_t *data, uint32_t bytes_number)
Read data from UART device. Blocking function.
Definition: maxim_uart.c:83
no_os_uart_desc::device_id
uint8_t device_id
Definition: no_os_uart.h:128
maxim_uart.h
Header file of UART driver.
no_os_uart_remove
int32_t no_os_uart_remove(struct no_os_uart_desc *desc)
Free the resources allocated by no_os_uart_init().
Definition: maxim_uart.c:387
gpio_cfg_uart2_flow
const mxc_gpio_cfg_t gpio_cfg_uart2_flow
Definition: maxim_uart.c:65
maxim_irq.h
Header file for maxim irq specifics.
max_uart_init_param::flow
enum max_uart_flow_ctrl flow
Definition: maxim_uart.h:60
lf256fifo_read
int lf256fifo_read(struct lf256fifo *, uint8_t *)
MAX_UART_FLOW_EN
@ MAX_UART_FLOW_EN
Definition: maxim_uart.h:52
UART_FLOW_LOW
@ UART_FLOW_LOW
Definition: maxim_uart.h:52
no_os_uart_desc
Stucture holding the UART descriptor.
Definition: no_os_uart.h:126
no_os_uart_init_param::asynchronous_rx
bool asynchronous_rx
Definition: no_os_uart.h:109
max_uart_desc
Platform specific UART state.
Definition: maxim_uart.h:66
maxim_uart.h
Header file of UART driver.
no_os_uart_write_nonblocking
int32_t no_os_uart_write_nonblocking(struct no_os_uart_desc *desc, const uint8_t *data, uint32_t bytes_number)
Write data to UART device. Non blocking function.
Definition: maxim_uart.c:174
max_irq_ops
const struct no_os_irq_platform_ops max_irq_ops
maxim specific IRQ platform ops structure
Definition: maxim_irq.c:570
max_uart_flow_ctrl
max_uart_flow_ctrl
UART flow control.
Definition: maxim_uart.h:50
NO_OS_UART_STOP_2_BIT
@ NO_OS_UART_STOP_2_BIT
Definition: no_os_uart.h:96
maxim_irq.h
Header file for maxim irq specifics.
no_os_irq_init_param::platform_ops
const struct no_os_irq_platform_ops * platform_ops
Definition: no_os_irq.h:107
no_os_uart_desc::rx_fifo
struct lf256fifo * rx_fifo
Definition: no_os_uart.h:132
lf256fifo_write
int lf256fifo_write(struct lf256fifo *, uint8_t)
no_os_irq_ctrl_init
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
max_uart_init_param
Aditional UART config parameters.
Definition: maxim_uart.h:59
UART_FLOW_DIS
@ UART_FLOW_DIS
Definition: maxim_uart.h:51
no_os_callback_desc::callback
void(* callback)(void *context)
Definition: no_os_irq.h:138
max_uart_callback
void max_uart_callback(mxc_uart_req_t *req, int result)
UART callback function that sets the event and further calls the user registered callback.
Definition: maxim_irq.c:214
NO_OS_UART_PAR_SPACE
@ NO_OS_UART_PAR_SPACE
Definition: no_os_uart.h:81
no_os_uart_init_param::baud_rate
uint32_t baud_rate
Definition: no_os_uart.h:111
no_os_uart_init_param::stop
enum no_os_uart_stop stop
Definition: no_os_uart.h:117
maxim_uart.h
Header file of UART driver.
no_os_uart_get_errors
uint32_t no_os_uart_get_errors(struct no_os_uart_desc *desc)
Not implemented.
Definition: maxim_uart.c:403
NO_OS_UART_PAR_EVEN
@ NO_OS_UART_PAR_EVEN
Definition: no_os_uart.h:85
no_os_lf256fifo.h
SPSC lock-free fifo of fixed size (256), specialized for UART.
no_os_uart_init
int32_t no_os_uart_init(struct no_os_uart_desc **desc, struct no_os_uart_init_param *param)
Initialize the UART communication peripheral.
Definition: maxim_uart.c:208
NO_OS_UART_CS_7
@ NO_OS_UART_CS_7
Definition: no_os_uart.h:64
NO_OS_UART_CS_6
@ NO_OS_UART_CS_6
Definition: no_os_uart.h:62
maxim_uart.h
Header file of UART driver.
NULL
#define NULL
Definition: wrapper.h:64
no_os_uart_init_param
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:103
maxim_irq.h
Header file for maxim irq specifics.
no_os_irq_init_param
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:103
NO_OS_UART_PAR_NO
@ NO_OS_UART_PAR_NO
Definition: no_os_uart.h:77
NO_OS_UART_IRQ
@ NO_OS_UART_IRQ
Definition: no_os_irq.h:87
no_os_irq_ctrl_remove
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:70
no_os_uart_init_param::device_id
uint8_t device_id
Definition: no_os_uart.h:105
no_os_irq_enable
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:144
uart_rx_callback
void uart_rx_callback(void *context)
Definition: maxim_uart.c:69
MAX_UART_FLOW_DIS
@ MAX_UART_FLOW_DIS
Definition: maxim_uart.h:51
NO_OS_UART_PAR_MARK
@ NO_OS_UART_PAR_MARK
Definition: no_os_uart.h:79
NO_OS_UART_PAR_ODD
@ NO_OS_UART_PAR_ODD
Definition: no_os_uart.h:83
maxim_irq.h
Header file for maxim irq specifics.
no_os_uart.h
Header file of UART interface.
maxim_uart.h
Header file of UART driver.
no_os_util.h
Header file of utility functions.
gpio_cfg_uart2_flow_disable
const mxc_gpio_cfg_t gpio_cfg_uart2_flow_disable
Definition: maxim_uart.c:66
UART_FLOW_HIGH
@ UART_FLOW_HIGH
Definition: maxim_uart.h:53
no_os_irq_ctrl_desc
Definition: no_os_irq.h:119
NO_OS_UART_CS_8
@ NO_OS_UART_CS_8
Definition: no_os_uart.h:66
maxim_irq.h
Header file for maxim irq specifics.
uart_irq_state
mxc_uart_req_t uart_irq_state[MXC_UART_INSTANCES]
Descriptors to hold the state of nonblocking read and writes on each port.
Definition: maxim_uart.c:60
errno.h
Error macro definition for ARM Compiler.
no_os_uart_read_nonblocking
int32_t no_os_uart_read_nonblocking(struct no_os_uart_desc *desc, uint8_t *data, uint32_t bytes_number)
Read data from UART device. Non blocking function.
Definition: maxim_uart.c:139