Go to the documentation of this file.
33 #ifndef _STM32_UART_H_
34 #define _STM32_UART_H_
enum no_os_uart_parity parity
Definition: no_os_uart.h:122
void lf256fifo_remove(struct lf256fifo *fifo)
@ NO_OS_EVT_UART_RX_COMPLETE
Definition: no_os_irq.h:64
void uart_rx_callback(void *context)
Definition: stm32_uart.c:45
void * extra
Definition: no_os_uart.h:127
Structure describing a callback to be registered.
Definition: no_os_irq.h:142
@ NO_OS_UART_STOP_1_BIT
Definition: no_os_uart.h:94
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
uint32_t baud_rate
Definition: no_os_uart.h:144
uint32_t irq_id
Definition: no_os_uart.h:114
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
UART_HandleTypeDef * huart
Definition: stm32_uart.h:59
uint8_t device_id
Definition: no_os_uart.h:138
uint32_t timeout
Definition: stm32_uart.h:61
struct no_os_irq_ctrl_desc * nvic
Definition: stm32_uart.h:63
enum no_os_irq_peripheral peripheral
Definition: no_os_irq.h:150
Specific initialization parameters for stm32 UART.
Definition: stm32_uart.h:46
int lf256fifo_read(struct lf256fifo *, uint8_t *)
Stucture holding the UART descriptor.
Definition: no_os_uart.h:134
bool asynchronous_rx
Definition: no_os_uart.h:116
const struct no_os_uart_platform_ops stm32_uart_ops
STM32 platform specific UART platform ops structure.
Definition: stm32_uart.c:297
Header file of UART driver for STM32.
void * extra
Definition: no_os_uart.h:147
Header file for stm32 irq specifics.
void * ctx
Definition: no_os_irq.h:146
stm32 platform specific UART descriptor
Definition: stm32_uart.h:57
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
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
uint32_t timeout
Definition: stm32_uart.h:50
int lf256fifo_write(struct lf256fifo *, uint8_t)
const struct no_os_irq_platform_ops stm32_irq_ops
stm32 specific IRQ platform ops structure
Definition: stm32_irq.c:582
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 baud_rate
Definition: no_os_uart.h:118
enum no_os_uart_stop stop
Definition: no_os_uart.h:124
@ NO_OS_UART_CS_9
Definition: no_os_uart.h:68
const struct no_os_uart_platform_ops stm32_uart_ops
STM32 specific UART platform ops structure.
Definition: stm32_uart.c:297
enum no_os_irq_event event
Definition: no_os_irq.h:148
@ NO_OS_UART_PAR_EVEN
Definition: no_os_uart.h:85
SPSC lock-free fifo of fixed size (256), specialized for UART.
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
#define NULL
Definition: wrapper.h:64
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:110
UART_HandleTypeDef * huart
Definition: stm32_uart.h:48
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
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
Header file of UART interface.
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
Definition: no_os_irq.h:123
struct no_os_callback_desc rx_callback
Definition: stm32_uart.h:65
@ NO_OS_UART_CS_8
Definition: no_os_uart.h:66
Error macro definition for ARM Compiler.