GEX core repository.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
gex-core/USB
Ondřej Hruška de75f2d91c
use new GEX vid pid
7 years ago
..
STM32_USB_Device_Library some fixes for cfg button 7 years ago
README.TXT implemented fallback to physical usart and basis for wireless support in the future 7 years ago
usb_device.c added watchdog 7 years ago
usb_device.h add usb re-plug functionality to F072 7 years ago
usbd_cdc_if.c various speed-ups in TF_WriteImpl and elsewhere 7 years ago
usbd_cdc_if.h Code import 7 years ago
usbd_conf.c compat with 072hub 7 years ago
usbd_conf.h implemented timebase using TIM14 instead of TIM1 7 years ago
usbd_desc.c use new GEX vid pid 7 years ago
usbd_desc.h Code import 7 years ago
usbd_storage_if.c implemented fallback to physical usart and basis for wireless support in the future 7 years ago
usbd_storage_if.h Code import 7 years ago

README.TXT

USB support is implemented using the STM32 USB Device library.

The library is copied into the core project to make customizations easier to maintain
across different ports. The USBD library supports all versions of the HAL and LL.

GEX uses USB classes CDC/ACM and MSC/SCSI.
The two classes are combined into a composite class with association descriptors.

USB interrupts are processed by the USBD library and endpoint callbacks in the composite
class are fired. To avoid race conditions (and because DAPlink did it the same way), the
events are notified to the USB thread (TaskMain) which calls endpoint handlers in the
corresponding class drivers.

VFS is handled synchronously on the main thread. CDC messages (TinyFrame data) are queued
and processed by the message queue thread. This makes it possible to query hardware
(e.g. slow USART or NeoPixel) without stalling the USB communication. This arrangement
also makes it possible to wait on a binary semaphore when sending data back to host. The
semaphore is set from the CDC TxComplete callback and taken by the TinyFrame write
function, serving as a form of flow control.

--------------------------------------------

COMM API:

GEX supports alternate command interfaces.

The active interface is set in the global variable gActiveComport
Due to special init procedures, the com_switch_transfer() function must be called to change it.

The TX function is defined in TF_Integration.c and any RX'd data is sent through rxQuePostMsg()