- basics of HS operation added
This commit is contained in:
parent
2a40a41687
commit
b5f84e77b7
@ -7,9 +7,13 @@
|
||||
#elif defined(STM32F407xx)
|
||||
#include <stm32f407xx.h>
|
||||
#include <stm32f4xx_hal.h>
|
||||
#ifdef USB_HIGH_SPEED
|
||||
#define USBG (USB_OTG_HS)
|
||||
#else
|
||||
#define USBG (USB_OTG_FS)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define USBG (USB_OTG_FS)
|
||||
#define USBD ((USB_OTG_DeviceTypeDef *) ((uint32_t)(USBG) + (uint32_t)(USB_OTG_DEVICE_BASE)))
|
||||
#define USBINEP ((USB_OTG_INEndpointTypeDef *) ((uint32_t)(USBG) + (uint32_t)(USB_OTG_IN_ENDPOINT_BASE)))
|
||||
#define USBOUTEP ((USB_OTG_OUTEndpointTypeDef *) ((uint32_t)(USBG) + (uint32_t)(USB_OTG_OUT_ENDPOINT_BASE)))
|
||||
|
@ -382,10 +382,11 @@ void usbdrv_initial_ep0_setup() {
|
||||
|
||||
// addresses of specific DIEPTXF registers, addresses from the RM
|
||||
static uint32_t *USB_pDIEPTXF[4] = {
|
||||
(uint32_t *)(USB_OTG_FS_PERIPH_BASE + 0x028), // DIEPTXF0
|
||||
(uint32_t *)(USB_OTG_FS_PERIPH_BASE + 0x104), // DIEPTXF1
|
||||
(uint32_t *)(USB_OTG_FS_PERIPH_BASE + 0x108), // DIEPTXF2
|
||||
(uint32_t *)(USB_OTG_FS_PERIPH_BASE + 0x10C), // DIEPTXF3
|
||||
(uint32_t *)(USBG + 0x028), // DIEPTXF0
|
||||
(uint32_t *)(USBG + 0x104), // DIEPTXF1
|
||||
(uint32_t *)(USBG + 0x108), // DIEPTXF2
|
||||
(uint32_t *)(USBG + 0x10C), // DIEPTXF3
|
||||
// TODO: HS USB controller has more endpoints
|
||||
};
|
||||
|
||||
// configure USB endpoint
|
||||
|
Loading…
x
Reference in New Issue
Block a user