diff --git a/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_hcd.c b/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_hcd.c index 3a23e4be58..284257ec11 100644 --- a/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_hcd.c +++ b/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_hcd.c @@ -340,8 +340,8 @@ HAL_StatusTypeDef HAL_HCD_HC_SubmitRequest(HCD_HandleTypeDef *hhcd, uint8_t do_ping) { // MBED: added - if ((hhcd->hc[ch_num].ep_is_in != direction)) { - if ((hhcd->hc[ch_num].ep_type == EP_TYPE_CTRL)){ + if (hhcd->hc[ch_num].ep_is_in != direction) { + if (hhcd->hc[ch_num].ep_type == EP_TYPE_CTRL){ /* reconfigure the endpoint !!! from tx -> rx, and rx ->tx */ USB_OTG_GlobalTypeDef *USBx = hhcd->Instance; if (direction) diff --git a/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_pcd.c b/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_pcd.c index 5e9e291208..a767722bbf 100644 --- a/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_pcd.c +++ b/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_pcd.c @@ -334,7 +334,7 @@ void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd) USB_OTG_GlobalTypeDef *USBx = hpcd->Instance; uint32_t i = 0, ep_intr = 0, epint = 0, epnum = 0; uint32_t fifoemptymsk = 0, temp = 0; - USB_OTG_EPTypeDef *ep = NULL; + // USB_OTG_EPTypeDef *ep = NULL; uint32_t hclk = 200000000; /* ensure that we are in device mode */ diff --git a/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_tim.c b/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_tim.c index 9d69d22626..b310d8a961 100644 --- a/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_tim.c +++ b/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_tim.c @@ -471,11 +471,11 @@ HAL_StatusTypeDef HAL_TIM_Base_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pDat /* Check the parameters */ assert_param(IS_TIM_DMA_INSTANCE(htim->Instance)); - if((htim->State == HAL_TIM_STATE_BUSY)) + if(htim->State == HAL_TIM_STATE_BUSY) { return HAL_BUSY; } - else if((htim->State == HAL_TIM_STATE_READY)) + else if(htim->State == HAL_TIM_STATE_READY) { if((pData == 0 ) && (Length > 0)) { @@ -895,11 +895,11 @@ HAL_StatusTypeDef HAL_TIM_OC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel /* Check the parameters */ assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); - if((htim->State == HAL_TIM_STATE_BUSY)) + if(htim->State == HAL_TIM_STATE_BUSY) { return HAL_BUSY; } - else if((htim->State == HAL_TIM_STATE_READY)) + else if(htim->State == HAL_TIM_STATE_READY) { if(((uint32_t)pData == 0 ) && (Length > 0)) { @@ -1435,11 +1435,11 @@ HAL_StatusTypeDef HAL_TIM_PWM_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channe /* Check the parameters */ assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); - if((htim->State == HAL_TIM_STATE_BUSY)) + if(htim->State == HAL_TIM_STATE_BUSY) { return HAL_BUSY; } - else if((htim->State == HAL_TIM_STATE_READY)) + else if(htim->State == HAL_TIM_STATE_READY) { if(((uint32_t)pData == 0 ) && (Length > 0)) { @@ -1949,11 +1949,11 @@ HAL_StatusTypeDef HAL_TIM_IC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); assert_param(IS_TIM_DMA_CC_INSTANCE(htim->Instance)); - if((htim->State == HAL_TIM_STATE_BUSY)) + if(htim->State == HAL_TIM_STATE_BUSY) { return HAL_BUSY; } - else if((htim->State == HAL_TIM_STATE_READY)) + else if(htim->State == HAL_TIM_STATE_READY) { if((pData == 0 ) && (Length > 0)) { @@ -2834,11 +2834,11 @@ HAL_StatusTypeDef HAL_TIM_Encoder_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Ch /* Check the parameters */ assert_param(IS_TIM_DMA_CC_INSTANCE(htim->Instance)); - if((htim->State == HAL_TIM_STATE_BUSY)) + if(htim->State == HAL_TIM_STATE_BUSY) { return HAL_BUSY; } - else if((htim->State == HAL_TIM_STATE_READY)) + else if(htim->State == HAL_TIM_STATE_READY) { if((((pData1 == 0) || (pData2 == 0) )) && (Length > 0)) { @@ -3656,11 +3656,11 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStart(TIM_HandleTypeDef *htim, uint32_t assert_param(IS_TIM_DMA_SOURCE(BurstRequestSrc)); assert_param(IS_TIM_DMA_LENGTH(BurstLength)); - if((htim->State == HAL_TIM_STATE_BUSY)) + if(htim->State == HAL_TIM_STATE_BUSY) { return HAL_BUSY; } - else if((htim->State == HAL_TIM_STATE_READY)) + else if(htim->State == HAL_TIM_STATE_READY) { if((BurstBuffer == 0 ) && (BurstLength > 0)) { @@ -3881,11 +3881,11 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStart(TIM_HandleTypeDef *htim, uint32_t B assert_param(IS_TIM_DMA_SOURCE(BurstRequestSrc)); assert_param(IS_TIM_DMA_LENGTH(BurstLength)); - if((htim->State == HAL_TIM_STATE_BUSY)) + if(htim->State == HAL_TIM_STATE_BUSY) { return HAL_BUSY; } - else if((htim->State == HAL_TIM_STATE_READY)) + else if(htim->State == HAL_TIM_STATE_READY) { if((BurstBuffer == 0 ) && (BurstLength > 0)) { diff --git a/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_tim_ex.c b/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_tim_ex.c index 4fdcc9ee6a..8b67763c67 100644 --- a/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_tim_ex.c +++ b/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_tim_ex.c @@ -423,11 +423,11 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef *htim, uint32 /* Check the parameters */ assert_param(IS_TIM_XOR_INSTANCE(htim->Instance)); - if((htim->State == HAL_TIM_STATE_BUSY)) + if(htim->State == HAL_TIM_STATE_BUSY) { return HAL_BUSY; } - else if((htim->State == HAL_TIM_STATE_READY)) + else if(htim->State == HAL_TIM_STATE_READY) { if(((uint32_t)pData == 0 ) && (Length > 0)) { @@ -729,11 +729,11 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Chan /* Check the parameters */ assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel)); - if((htim->State == HAL_TIM_STATE_BUSY)) + if(htim->State == HAL_TIM_STATE_BUSY) { return HAL_BUSY; } - else if((htim->State == HAL_TIM_STATE_READY)) + else if(htim->State == HAL_TIM_STATE_READY) { if(((uint32_t)pData == 0 ) && (Length > 0)) { @@ -1145,11 +1145,11 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Cha /* Check the parameters */ assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel)); - if((htim->State == HAL_TIM_STATE_BUSY)) + if(htim->State == HAL_TIM_STATE_BUSY) { return HAL_BUSY; } - else if((htim->State == HAL_TIM_STATE_READY)) + else if(htim->State == HAL_TIM_STATE_READY) { if(((uint32_t)pData == 0 ) && (Length > 0)) { diff --git a/targets/TARGET_STM/TARGET_STM32F7/flash_api.c b/targets/TARGET_STM/TARGET_STM32F7/flash_api.c index de705096ef..19c0f38b4c 100644 --- a/targets/TARGET_STM/TARGET_STM32F7/flash_api.c +++ b/targets/TARGET_STM/TARGET_STM32F7/flash_api.c @@ -281,7 +281,7 @@ static uint32_t GetSectorSize(uint32_t Sector) */ static uint32_t GetSectorBase(uint32_t SectorId) { - int i = 0; + uint32_t i = 0; uint32_t address_sector = FLASH_BASE; for (i = 0; i < SectorId; i++) {