diff options
| author | Damien George | 2015-01-20 11:55:10 +0000 |
|---|---|---|
| committer | Damien George | 2015-01-20 11:55:10 +0000 |
| commit | 50912e7f5dc579fd2917537046793dfa30decadf (patch) | |
| tree | 541d6f7531d9d75e168fc914f226d15b4c7faf04 /stmhal/usbd_conf.c | |
| parent | 640e0b221e972f9a2da2d870bf3fc5a93c18f0ec (diff) | |
py, unix, stmhal: Allow to compile with -Wshadow.
See issue #699.
Diffstat (limited to 'stmhal/usbd_conf.c')
| -rw-r--r-- | stmhal/usbd_conf.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/stmhal/usbd_conf.c b/stmhal/usbd_conf.c index eddf1d626..e599b0ebf 100644 --- a/stmhal/usbd_conf.c +++ b/stmhal/usbd_conf.c @@ -37,7 +37,7 @@ /* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
-PCD_HandleTypeDef hpcd;
+PCD_HandleTypeDef pcd_handle;
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
@@ -331,62 +331,62 @@ USBD_StatusTypeDef USBD_LL_Init (USBD_HandleTypeDef *pdev) {
#ifdef USE_USB_FS
/*Set LL Driver parameters */
- hpcd.Instance = USB_OTG_FS;
- hpcd.Init.dev_endpoints = 4;
- hpcd.Init.use_dedicated_ep1 = 0;
- hpcd.Init.ep0_mps = 0x40;
- hpcd.Init.dma_enable = 0;
- hpcd.Init.low_power_enable = 0;
- hpcd.Init.phy_itface = PCD_PHY_EMBEDDED;
- hpcd.Init.Sof_enable = 0;
- hpcd.Init.speed = PCD_SPEED_FULL;
+ pcd_handle.Instance = USB_OTG_FS;
+ pcd_handle.Init.dev_endpoints = 4;
+ pcd_handle.Init.use_dedicated_ep1 = 0;
+ pcd_handle.Init.ep0_mps = 0x40;
+ pcd_handle.Init.dma_enable = 0;
+ pcd_handle.Init.low_power_enable = 0;
+ pcd_handle.Init.phy_itface = PCD_PHY_EMBEDDED;
+ pcd_handle.Init.Sof_enable = 0;
+ pcd_handle.Init.speed = PCD_SPEED_FULL;
#if !defined(MICROPY_HW_USB_VBUS_DETECT_PIN)
- hpcd.Init.vbus_sensing_enable = 0; // No VBUS Sensing on USB0
+ pcd_handle.Init.vbus_sensing_enable = 0; // No VBUS Sensing on USB0
#else
- hpcd.Init.vbus_sensing_enable = 1;
+ pcd_handle.Init.vbus_sensing_enable = 1;
#endif
/* Link The driver to the stack */
- hpcd.pData = pdev;
- pdev->pData = &hpcd;
+ pcd_handle.pData = pdev;
+ pdev->pData = &pcd_handle;
/*Initialize LL Driver */
- HAL_PCD_Init(&hpcd);
+ HAL_PCD_Init(&pcd_handle);
- HAL_PCD_SetRxFiFo(&hpcd, 0x80);
- HAL_PCD_SetTxFiFo(&hpcd, 0, 0x20);
- HAL_PCD_SetTxFiFo(&hpcd, 1, 0x40);
- HAL_PCD_SetTxFiFo(&hpcd, 2, 0x20);
- HAL_PCD_SetTxFiFo(&hpcd, 3, 0x40);
+ HAL_PCD_SetRxFiFo(&pcd_handle, 0x80);
+ HAL_PCD_SetTxFiFo(&pcd_handle, 0, 0x20);
+ HAL_PCD_SetTxFiFo(&pcd_handle, 1, 0x40);
+ HAL_PCD_SetTxFiFo(&pcd_handle, 2, 0x20);
+ HAL_PCD_SetTxFiFo(&pcd_handle, 3, 0x40);
#endif
#ifdef USE_USB_HS
/*Set LL Driver parameters */
- hpcd.Instance = USB_OTG_HS;
- hpcd.Init.dev_endpoints = 6;
- hpcd.Init.use_dedicated_ep1 = 0;
- hpcd.Init.ep0_mps = 0x40;
+ pcd_handle.Instance = USB_OTG_HS;
+ pcd_handle.Init.dev_endpoints = 6;
+ pcd_handle.Init.use_dedicated_ep1 = 0;
+ pcd_handle.Init.ep0_mps = 0x40;
/* Be aware that enabling USB-DMA mode will result in data being sent only by
multiple of 4 packet sizes. This is due to the fact that USB-DMA does
not allow sending data from non word-aligned addresses.
For this specific application, it is advised to not enable this option
unless required. */
- hpcd.Init.dma_enable = 0;
+ pcd_handle.Init.dma_enable = 0;
- hpcd.Init.low_power_enable = 0;
- hpcd.Init.phy_itface = PCD_PHY_ULPI;
- hpcd.Init.Sof_enable = 0;
- hpcd.Init.speed = PCD_SPEED_HIGH;
- hpcd.Init.vbus_sensing_enable = 1;
+ pcd_handle.Init.low_power_enable = 0;
+ pcd_handle.Init.phy_itface = PCD_PHY_ULPI;
+ pcd_handle.Init.Sof_enable = 0;
+ pcd_handle.Init.speed = PCD_SPEED_HIGH;
+ pcd_handle.Init.vbus_sensing_enable = 1;
/* Link The driver to the stack */
- hpcd.pData = pdev;
- pdev->pData = &hpcd;
+ pcd_handle.pData = pdev;
+ pdev->pData = &pcd_handle;
/*Initialize LL Driver */
- HAL_PCD_Init(&hpcd);
+ HAL_PCD_Init(&pcd_handle);
- HAL_PCD_SetRxFiFo(&hpcd, 0x200);
- HAL_PCD_SetTxFiFo(&hpcd, 0, 0x80);
- HAL_PCD_SetTxFiFo(&hpcd, 1, 0x174);
+ HAL_PCD_SetRxFiFo(&pcd_handle, 0x200);
+ HAL_PCD_SetTxFiFo(&pcd_handle, 0, 0x80);
+ HAL_PCD_SetTxFiFo(&pcd_handle, 1, 0x174);
#endif
|
