Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Usb 在CubeMX生成的项目中,PCD_EP_TX_地址定义在哪里?_Usb_Stm32_Stm32f3 - Fatal编程技术网

Usb 在CubeMX生成的项目中,PCD_EP_TX_地址定义在哪里?

Usb 在CubeMX生成的项目中,PCD_EP_TX_地址定义在哪里?,usb,stm32,stm32f3,Usb,Stm32,Stm32f3,我需要从stm32f3xx\u hal\u PCD.h使用宏PCD\u GET\u EP\u TX\u ADDRESS 其定义如下: #define PCD_GET_EP_TX_ADDRESS(USBx, bEpNum) ((uint16_t)*PCD_EP_TX_ADDRESS((USBx), (bEpNum))) 但使用它会导致编译错误,因为未定义PCD\u EP\u TX\u地址 我对整个项目和字符串PCD\u EP\u TX\u ADDRESS进行了灰色搜索,结果如下: fadedbe

我需要从
stm32f3xx\u hal\u PCD.h
使用宏
PCD\u GET\u EP\u TX\u ADDRESS

其定义如下:

#define PCD_GET_EP_TX_ADDRESS(USBx, bEpNum) ((uint16_t)*PCD_EP_TX_ADDRESS((USBx), (bEpNum)))
但使用它会导致编译错误,因为未定义
PCD\u EP\u TX\u地址

我对整个项目和字符串
PCD\u EP\u TX\u ADDRESS
进行了灰色搜索,结果如下:

fadedbee@host:~/cubeide/f3-hid$ grep -R "PCD_EP_TX_ADDRESS" *
Binary file Debug/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src/usbd_hid.o matches
Binary file Debug/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.o matches
Binary file Debug/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.o matches
Binary file Debug/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.o matches
Binary file Debug/USB_DEVICE/App/usb_device.o matches
Binary file Debug/USB_DEVICE/App/usbd_desc.o matches
Binary file Debug/USB_DEVICE/Target/usbd_conf.o matches
Binary file Debug/Core/Src/stm32f3xx_it.o matches
Binary file Debug/Core/Src/system_stm32f3xx.o matches
Binary file Debug/Core/Src/main.o matches
Binary file Debug/Core/Src/stm32f3xx_hal_msp.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_i2c.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_spi_ex.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_gpio.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_uart.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_flash_ex.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_i2c_ex.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_flash.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_pcd_ex.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_pwr.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_tim.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_tim_ex.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_dma.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_spi.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_uart_ex.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_cortex.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_rcc.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_rcc_ex.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_pwr_ex.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_pcd.o matches
Binary file Debug/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_exti.o matches
Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pcd.h:#define PCD_GET_EP_TX_ADDRESS(USBx, bEpNum) ((uint16_t)*PCD_EP_TX_ADDRESS((USBx), (bEpNum)))
字符串出现在许多对象文件中,表明它是在某个位置定义的


在哪里定义了PCD\U EP\U TX\U地址?

它似乎是在内部声明的

它可能没有被CubeMX包括在内,因为CubeMX有时是垃圾。不过,导出中有一些选项,允许您包含比cubemx使用的库更多的要导出的库部分


请不要忘记在
stm32xx_HAL_conf.h

中设置正确的HAL include定义,我检查了两个
.o
文件中的
字符串,只找到了相同的宏定义。
#define PCD_EP_TX_ADDRESS(USBx, bEpNum) ((uint16_t *)((uint32_t)((((USBx)->BTABLE+(bEpNum)*8)*2+     ((uint32_t)(USBx) + 0x400U)))))