no-OS
Macros | Functions | Variables
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 hUsbDeviceFS
 
USBD_CDC_ItfTypeDef USBD_Interface_fops_FS
 
const struct no_os_uart_platform_ops stm32_usb_uart_ops
 STM32 platform specific UART platform ops structure. More...
 

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.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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

◆ hUsbDeviceFS

USBD_HandleTypeDef hUsbDeviceFS

◆ 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_FS

USBD_CDC_ItfTypeDef USBD_Interface_fops_FS
Initial value:
= {
CDC_Init_FS,
CDC_DeInit_FS,
CDC_Control_FS,
CDC_Receive_FS,
CDC_TransmitCplt_FS
}