![]() |
ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
|
Low-level glue between the ST USB device library and the HAL PCD driver of the STM32WB55 (USB FS device, PA11/PA12). More...
#include "usbd_conf.h"#include "usbd_core.h"#include "usbd_cdc.h"#include "hw_conf.h"#include "stm32wbxx_ll_crs.h"#include "stm32wbxx_ll_rcc.h"#include "stm32wbxx_ll_hsem.h"#include "stm32wbxx_ll_bus.h"Go to the source code of this file.
Functions | |
| static void | clk48_on (void) |
| void | HAL_PCD_MspInit (PCD_HandleTypeDef *pcd) |
| void | HAL_PCD_MspDeInit (PCD_HandleTypeDef *pcd) |
| void | USB_LP_IRQHandler (void) |
| void | HAL_PCD_SetupStageCallback (PCD_HandleTypeDef *pcd) |
| void | HAL_PCD_DataOutStageCallback (PCD_HandleTypeDef *pcd, uint8_t ep) |
| void | HAL_PCD_DataInStageCallback (PCD_HandleTypeDef *pcd, uint8_t ep) |
| void | HAL_PCD_SOFCallback (PCD_HandleTypeDef *pcd) |
| void | HAL_PCD_ResetCallback (PCD_HandleTypeDef *pcd) |
| void | HAL_PCD_SuspendCallback (PCD_HandleTypeDef *pcd) |
| void | HAL_PCD_ResumeCallback (PCD_HandleTypeDef *pcd) |
| void | HAL_PCD_ISOOUTIncompleteCallback (PCD_HandleTypeDef *pcd, uint8_t ep) |
| void | HAL_PCD_ISOINIncompleteCallback (PCD_HandleTypeDef *pcd, uint8_t ep) |
| void | HAL_PCD_ConnectCallback (PCD_HandleTypeDef *pcd) |
| void | HAL_PCD_DisconnectCallback (PCD_HandleTypeDef *pcd) |
| static USBD_StatusTypeDef | st (HAL_StatusTypeDef h) |
| USBD_StatusTypeDef | USBD_LL_Init (USBD_HandleTypeDef *pdev) |
| USBD_StatusTypeDef | USBD_LL_DeInit (USBD_HandleTypeDef *pdev) |
| USBD_StatusTypeDef | USBD_LL_Start (USBD_HandleTypeDef *pdev) |
| USBD_StatusTypeDef | USBD_LL_Stop (USBD_HandleTypeDef *pdev) |
| USBD_StatusTypeDef | USBD_LL_OpenEP (USBD_HandleTypeDef *pdev, uint8_t ep, uint8_t type, uint16_t mps) |
| USBD_StatusTypeDef | USBD_LL_CloseEP (USBD_HandleTypeDef *pdev, uint8_t ep) |
| USBD_StatusTypeDef | USBD_LL_FlushEP (USBD_HandleTypeDef *pdev, uint8_t ep) |
| USBD_StatusTypeDef | USBD_LL_StallEP (USBD_HandleTypeDef *pdev, uint8_t ep) |
| USBD_StatusTypeDef | USBD_LL_ClearStallEP (USBD_HandleTypeDef *pdev, uint8_t ep) |
| uint8_t | USBD_LL_IsStallEP (USBD_HandleTypeDef *pdev, uint8_t ep) |
| USBD_StatusTypeDef | USBD_LL_SetUSBAddress (USBD_HandleTypeDef *pdev, uint8_t addr) |
| USBD_StatusTypeDef | USBD_LL_Transmit (USBD_HandleTypeDef *pdev, uint8_t ep, uint8_t *buf, uint32_t size) |
| USBD_StatusTypeDef | USBD_LL_PrepareReceive (USBD_HandleTypeDef *pdev, uint8_t ep, uint8_t *buf, uint32_t size) |
| uint32_t | USBD_LL_GetRxDataSize (USBD_HandleTypeDef *pdev, uint8_t ep) |
| void | USBD_LL_Delay (uint32_t ms) |
| void * | USBD_static_malloc (uint32_t size) |
| void | USBD_static_free (void *p) |
Variables | |
| PCD_HandleTypeDef | hpcd_USB_FS |
Low-level glue between the ST USB device library and the HAL PCD driver of the STM32WB55 (USB FS device, PA11/PA12).
Written after the ST template usbd_conf_template.c and the STM32CubeWB CDC examples.
Clocking: the USB peripheral runs from HSI48, trimmed by the CRS on the USB start-of-frame (no crystal needed). On the WB55, CPU2 also uses HSI48 (RNG): CPU1 holds hardware semaphore CFG_HW_CLK48_CONFIG_SEMID while USB is on, so CPU2 never switches HSI48 off (AN5289 ยง4.7).
Definition in file usbd_conf.c.
|
static |
Definition at line 25 of file usbd_conf.c.
Referenced by HAL_PCD_MspInit().
| void HAL_PCD_MspInit | ( | PCD_HandleTypeDef * | pcd | ) |
Definition at line 47 of file usbd_conf.c.
References clk48_on().
| void HAL_PCD_MspDeInit | ( | PCD_HandleTypeDef * | pcd | ) |
Definition at line 59 of file usbd_conf.c.
| void USB_LP_IRQHandler | ( | void | ) |
Definition at line 66 of file usbd_conf.c.
References hpcd_USB_FS.
| void HAL_PCD_SetupStageCallback | ( | PCD_HandleTypeDef * | pcd | ) |
Definition at line 69 of file usbd_conf.c.
| void HAL_PCD_DataOutStageCallback | ( | PCD_HandleTypeDef * | pcd, |
| uint8_t | ep | ||
| ) |
Definition at line 70 of file usbd_conf.c.
| void HAL_PCD_DataInStageCallback | ( | PCD_HandleTypeDef * | pcd, |
| uint8_t | ep | ||
| ) |
Definition at line 71 of file usbd_conf.c.
| void HAL_PCD_SOFCallback | ( | PCD_HandleTypeDef * | pcd | ) |
Definition at line 72 of file usbd_conf.c.
| void HAL_PCD_ResetCallback | ( | PCD_HandleTypeDef * | pcd | ) |
Definition at line 73 of file usbd_conf.c.
| void HAL_PCD_SuspendCallback | ( | PCD_HandleTypeDef * | pcd | ) |
Definition at line 78 of file usbd_conf.c.
| void HAL_PCD_ResumeCallback | ( | PCD_HandleTypeDef * | pcd | ) |
Definition at line 79 of file usbd_conf.c.
| void HAL_PCD_ISOOUTIncompleteCallback | ( | PCD_HandleTypeDef * | pcd, |
| uint8_t | ep | ||
| ) |
Definition at line 80 of file usbd_conf.c.
| void HAL_PCD_ISOINIncompleteCallback | ( | PCD_HandleTypeDef * | pcd, |
| uint8_t | ep | ||
| ) |
Definition at line 81 of file usbd_conf.c.
| void HAL_PCD_ConnectCallback | ( | PCD_HandleTypeDef * | pcd | ) |
Definition at line 82 of file usbd_conf.c.
| void HAL_PCD_DisconnectCallback | ( | PCD_HandleTypeDef * | pcd | ) |
Definition at line 83 of file usbd_conf.c.
|
static |
Definition at line 86 of file usbd_conf.c.
Referenced by checks_build(), commands(), imu_fifo_parse(), imu_init(), ImuTask(), mag_setup(), put(), send_status(), set_state(), sh_read(), single_op(), tlm_ble_set_state(), usb_commands(), USBD_LL_ClearStallEP(), USBD_LL_CloseEP(), USBD_LL_DeInit(), USBD_LL_FlushEP(), USBD_LL_OpenEP(), USBD_LL_PrepareReceive(), USBD_LL_SetUSBAddress(), USBD_LL_StallEP(), USBD_LL_Start(), USBD_LL_Stop(), USBD_LL_Transmit(), vl53_init(), and xfer().
| USBD_StatusTypeDef USBD_LL_Init | ( | USBD_HandleTypeDef * | pdev | ) |
Definition at line 91 of file usbd_conf.c.
References hpcd_USB_FS.
| USBD_StatusTypeDef USBD_LL_DeInit | ( | USBD_HandleTypeDef * | pdev | ) |
Definition at line 114 of file usbd_conf.c.
References st().
| USBD_StatusTypeDef USBD_LL_Start | ( | USBD_HandleTypeDef * | pdev | ) |
Definition at line 115 of file usbd_conf.c.
References st().
| USBD_StatusTypeDef USBD_LL_Stop | ( | USBD_HandleTypeDef * | pdev | ) |
Definition at line 116 of file usbd_conf.c.
References st().
| USBD_StatusTypeDef USBD_LL_OpenEP | ( | USBD_HandleTypeDef * | pdev, |
| uint8_t | ep, | ||
| uint8_t | type, | ||
| uint16_t | mps | ||
| ) |
Definition at line 118 of file usbd_conf.c.
References st().
| USBD_StatusTypeDef USBD_LL_CloseEP | ( | USBD_HandleTypeDef * | pdev, |
| uint8_t | ep | ||
| ) |
Definition at line 122 of file usbd_conf.c.
References st().
| USBD_StatusTypeDef USBD_LL_FlushEP | ( | USBD_HandleTypeDef * | pdev, |
| uint8_t | ep | ||
| ) |
Definition at line 123 of file usbd_conf.c.
References st().
| USBD_StatusTypeDef USBD_LL_StallEP | ( | USBD_HandleTypeDef * | pdev, |
| uint8_t | ep | ||
| ) |
Definition at line 124 of file usbd_conf.c.
References st().
| USBD_StatusTypeDef USBD_LL_ClearStallEP | ( | USBD_HandleTypeDef * | pdev, |
| uint8_t | ep | ||
| ) |
Definition at line 125 of file usbd_conf.c.
References st().
| uint8_t USBD_LL_IsStallEP | ( | USBD_HandleTypeDef * | pdev, |
| uint8_t | ep | ||
| ) |
Definition at line 127 of file usbd_conf.c.
| USBD_StatusTypeDef USBD_LL_SetUSBAddress | ( | USBD_HandleTypeDef * | pdev, |
| uint8_t | addr | ||
| ) |
| USBD_StatusTypeDef USBD_LL_Transmit | ( | USBD_HandleTypeDef * | pdev, |
| uint8_t | ep, | ||
| uint8_t * | buf, | ||
| uint32_t | size | ||
| ) |
Definition at line 138 of file usbd_conf.c.
References st().
| USBD_StatusTypeDef USBD_LL_PrepareReceive | ( | USBD_HandleTypeDef * | pdev, |
| uint8_t | ep, | ||
| uint8_t * | buf, | ||
| uint32_t | size | ||
| ) |
Definition at line 143 of file usbd_conf.c.
References st().
| uint32_t USBD_LL_GetRxDataSize | ( | USBD_HandleTypeDef * | pdev, |
| uint8_t | ep | ||
| ) |
Definition at line 148 of file usbd_conf.c.
| void USBD_LL_Delay | ( | uint32_t | ms | ) |
Definition at line 153 of file usbd_conf.c.
References ms.
| void * USBD_static_malloc | ( | uint32_t | size | ) |
Definition at line 156 of file usbd_conf.c.
| void USBD_static_free | ( | void * | p | ) |
Definition at line 161 of file usbd_conf.c.
| PCD_HandleTypeDef hpcd_USB_FS |
Definition at line 22 of file usbd_conf.c.
Referenced by USB_LP_IRQHandler(), and USBD_LL_Init().