ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
Loading...
Searching...
No Matches
usb_cdc.h File Reference

USB CDC (virtual COM port) binding of the USB link (telemetry/usb_link.h). More...

#include <stdint.h>
Include dependency graph for usb_cdc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int usb_cdc_init (void)
 0 = started
 
void usb_cdc_pump (void)
 
uint8_t usb_cdc_configured (void)
 enumerated by a host
 

Detailed Description

USB CDC (virtual COM port) binding of the USB link (telemetry/usb_link.h).

usb_cdc_init() starts the USB device. Received bytes go to usbl_rx_isr() from the USB interrupt, DTR (SET_CONTROL_LINE_STATE) to usbl_set_dtr(). usb_cdc_pump(), called by the LogTask, reports the configured state (usbl_set_configured()) and moves queued TX bytes to the IN endpoint whenever the previous transfer has finished. The line coding set by the PC (baud rate, ...) is ignored: CDC runs at the USB rate.

Definition in file usb_cdc.h.

Function Documentation

◆ usb_cdc_init()

int usb_cdc_init ( void  )

0 = started

Definition at line 61 of file usb_cdc.c.

References ACW_FS_Desc, DEVICE_FS, s_dev, and s_itf.

Referenced by app_start().

Here is the caller graph for this function:

◆ usb_cdc_pump()

void usb_cdc_pump ( void  )

Definition at line 72 of file usb_cdc.c.

References n, s_dev, s_tx, usb_cdc_configured(), usbl_set_configured(), usbl_tx_consume(), usbl_tx_flush(), and usbl_tx_peek().

Referenced by app_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usb_cdc_configured()

uint8_t usb_cdc_configured ( void  )

enumerated by a host

Definition at line 70 of file usb_cdc.c.

References s_dev.

Referenced by usb_cdc_pump().

Here is the caller graph for this function: