no-OS
stm32_usb_uart.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef _STM32_USB_UART_H_
34 #define _STM32_USB_UART_H_
35 
36 #include <stdint.h>
37 #include <stdbool.h>
38 #include "no_os_uart.h"
39 #include "stm32_hal.h"
40 #include "usbd_cdc.h"
41 
48  USBD_HandleTypeDef *husbdevice;
49 };
50 
57  USBD_HandleTypeDef *husbdevice;
59  struct lf256fifo *fifo;
60 };
61 
66 
67 #endif
no_os_alloc.h
lf256fifo_remove
void lf256fifo_remove(struct lf256fifo *fifo)
no_os_uart_platform_ops
Structure holding UART function pointers that point to the platform specific function.
Definition: no_os_uart.h:155
stm32_usb_uart_desc::fifo
struct lf256fifo * fifo
Definition: stm32_usb_uart.h:59
no_os_uart_init_param::extra
void * extra
Definition: no_os_uart.h:127
stm32_usb_uart_ops
const struct no_os_uart_platform_ops stm32_usb_uart_ops
stm32 specific UART over USB platform ops structure.
Definition: stm32_usb_uart.c:277
lf256fifo_init
int lf256fifo_init(struct lf256fifo **)
stm32_usb_uart.h
UART over USB driver for stm32 as a no_os_uart implementation.
no_os_uart_platform_ops::init
int32_t(* init)(struct no_os_uart_desc **, struct no_os_uart_init_param *)
Definition: no_os_uart.h:157
no_os_calloc
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
stm32_on_usb_cdc_acm_rx
void stm32_on_usb_cdc_acm_rx(uint8_t *buf, uint32_t len)
Definition: stm32_usb_uart.c:96
lf256fifo_read
int lf256fifo_read(struct lf256fifo *, uint8_t *)
no_os_min
#define no_os_min(x, y)
Definition: no_os_util.h:59
no_os_uart_desc
Stucture holding the UART descriptor.
Definition: no_os_uart.h:134
no_os_uart_desc::extra
void * extra
Definition: no_os_uart.h:147
stm32_usb_uart_desc
stm32 platform specific UART over USB descriptor.
Definition: stm32_usb_uart.h:55
USBD_Interface_fops
USBD_CDC_ItfTypeDef USBD_Interface_fops
Definition: stm32_usb_uart.c:70
stm32_usb_uart_init_param
Specific initialization parameters for stm32 UART over USB.
Definition: stm32_usb_uart.h:46
gusbdevice
USBD_HandleTypeDef * gusbdevice
Definition: stm32_usb_uart.c:52
stm32_usb_uart_init_param::husbdevice
USBD_HandleTypeDef * husbdevice
Definition: stm32_usb_uart.h:48
STM32_USB_CDC_ACM_RXBUF_LEN
#define STM32_USB_CDC_ACM_RXBUF_LEN
Definition: stm32_usb_uart.c:42
lf256fifo_write
int lf256fifo_write(struct lf256fifo *, uint8_t)
no_os_lf256fifo.h
SPSC lock-free fifo of fixed size (256), specialized for UART.
stm32_usb_uart_desc::husbdevice
USBD_HandleTypeDef * husbdevice
Definition: stm32_usb_uart.h:57
no_os_free
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
no_os_uart_init_param
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:110
stm32_usb_uart_ops
const struct no_os_uart_platform_ops stm32_usb_uart_ops
STM32 platform specific UART platform ops structure.
Definition: stm32_usb_uart.c:277
no_os_uart.h
Header file of UART interface.
no_os_util.h
Header file of utility functions.
stm32_hal.h
errno.h
Error macro definition for ARM Compiler.
STM32_USB_CDC_ACM_TXBUF_LEN
#define STM32_USB_CDC_ACM_TXBUF_LEN
Definition: stm32_usb_uart.c:46