no-OS
Loading...
Searching...
No Matches
stm32_usb_uart.c File Reference

UART over USB driver for stm32 as a no_os_uart implementation. More...

#include <errno.h>
#include <stdlib.h>
#include "no_os_util.h"
#include "stm32_usb_uart.h"
#include "no_os_lf256fifo.h"
#include "no_os_alloc.h"
#include "usbd_cdc.h"
Include dependency graph for stm32_usb_uart.c:

Macros

#define STM32_USB_CDC_ACM_RXBUF_LEN   512
 
#define STM32_USB_CDC_ACM_TXBUF_LEN   512
 

Functions

void stm32_on_usb_cdc_acm_rx (uint8_t *buf, uint32_t len)
 

Variables

USBD_HandleTypeDef * gusbdevice
 
USBD_CDC_ItfTypeDef USBD_Interface_fops
 
const struct no_os_uart_platform_ops stm32_usb_uart_ops
 STM32 platform specific UART platform ops structure.
 

Detailed Description

UART over USB driver for stm32 as a no_os_uart implementation.

Author
Darius Berghe (dariu.nosp@m.s.be.nosp@m.rghe@.nosp@m.anal.nosp@m.og.co.nosp@m.m)

Copyright 2024(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Macro Definition Documentation

◆ STM32_USB_CDC_ACM_RXBUF_LEN

#define STM32_USB_CDC_ACM_RXBUF_LEN   512

◆ STM32_USB_CDC_ACM_TXBUF_LEN

#define STM32_USB_CDC_ACM_TXBUF_LEN   512

Function Documentation

◆ stm32_on_usb_cdc_acm_rx()

void stm32_on_usb_cdc_acm_rx ( uint8_t * buf,
uint32_t len )

Variable Documentation

◆ gusbdevice

USBD_HandleTypeDef* gusbdevice

◆ stm32_usb_uart_ops

const struct no_os_uart_platform_ops stm32_usb_uart_ops
Initial value:
= {
.init = &stm32_usb_uart_init,
.read = &stm32_usb_uart_read,
.write = &stm32_usb_uart_write,
.remove = &stm32_usb_uart_remove
}

STM32 platform specific UART platform ops structure.

stm32 specific UART over USB platform ops structure.

◆ USBD_Interface_fops

USBD_CDC_ItfTypeDef USBD_Interface_fops
Initial value:
= {
CDC_Init,
CDC_DeInit,
CDC_Control,
CDC_Receive,
CDC_TransmitCplt
}