TM STM32Fxxx HAL Libraries  v1.0.0
Libraries for STM32Fxxx (F0, F4 and F7 series) devices based on HAL drivers from ST from Tilen Majerle
TM_USBD_CDC_Settings_t Struct Reference

Settings structure for USB CDC. More...

#include <tm_stm32_usb_device_cdc.h>

Data Fields

uint32_t Baudrate
 
uint8_t Stopbits
 
uint8_t DataBits
 
uint8_t Parity
 
uint8_t Updated
 

Detailed Description

Settings structure for USB CDC.

Field Documentation

uint32_t Baudrate

Baudrate, which is set by user on terminal. Value is number of bits per second, for example: 115200

uint8_t DataBits

Data bits, which is set by user on terminal. Possible values:

  • 5: 5 data bits
  • 6: 6 data bits
  • 7: 7 data bits
  • 8: 8 data bits
  • 9: 9 data bits
uint8_t Parity

Parity, which is set by user on terminal. Possible values:

  • 0: No parity
  • 1: Odd parity
  • 2: Even parity
  • 3: Mark parity
  • 4: Space parity
uint8_t Stopbits

Stop bits, which is set by user on terminal. Possible values:

  • 0: 1 stop bit
  • 1: 1.5 stop bits -> This value is not supported on UART on STM32 in case you want to make USB <-> UART converter
  • 2: 2 stop bits
uint8_t Updated

When you check for settings in my function, this will be set to 1 if user has changed parameters, so you can reinitialize USART peripheral if you need to.