Skip to content

Commit de3f9ef

Browse files
committed
STM32H7 : remove warning
[Warning] stm32h7xx_hal_hrtim.c@1621,21: equality comparison with extraneous parentheses [-Wparentheses-equality] [Warning] stm32h7xx_hal_hrtim.c@1625,21: equality comparison with extraneous parentheses [-Wparentheses-equality] [Warning] stm32h7xx_hal_hrtim.c@2238,21: equality comparison with extraneous parentheses [-Wparentheses-equality] [Warning] stm32h7xx_hal_hrtim.c@2242,21: equality comparison with extraneous parentheses [-Wparentheses-equality] [Warning] stm32h7xx_hal_hrtim.c@5332,21: equality comparison with extraneous parentheses [-Wparentheses-equality] [Warning] stm32h7xx_hal_hrtim.c@5767,21: equality comparison with extraneous parentheses [-Wparentheses-equality] [Warning] stm32h7xx_hal_hrtim.c@5771,21: equality comparison with extraneous parentheses [-Wparentheses-equality] [Warning] analogin_device.c@63,30: comparison between 'PinName' and 'enum <anonymous>' [-Wenum-compare]
1 parent 3237bff commit de3f9ef

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal_hrtim.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,13 +1618,13 @@ HAL_StatusTypeDef HAL_HRTIM_SimpleOCStart_DMA(HRTIM_HandleTypeDef * hhrtim,
16181618
/* Check the parameters */
16191619
assert_param(IS_HRTIM_TIMER_OUTPUT(TimerIdx, OCChannel));
16201620

1621-
if((hhrtim->State == HAL_HRTIM_STATE_BUSY))
1621+
if (hhrtim->State == HAL_HRTIM_STATE_BUSY)
16221622
{
16231623
return HAL_BUSY;
16241624
}
1625-
if((hhrtim->State == HAL_HRTIM_STATE_READY))
1625+
if (hhrtim->State == HAL_HRTIM_STATE_READY)
16261626
{
1627-
if((SrcAddr == 0U ) || (DestAddr == 0U ) || (Length == 0U))
1627+
if ((SrcAddr == 0U ) || (DestAddr == 0U ) || (Length == 0U))
16281628
{
16291629
return HAL_ERROR;
16301630
}
@@ -2235,13 +2235,13 @@ HAL_StatusTypeDef HAL_HRTIM_SimplePWMStart_DMA(HRTIM_HandleTypeDef * hhrtim,
22352235
/* Check the parameters */
22362236
assert_param(IS_HRTIM_TIMER_OUTPUT(TimerIdx, PWMChannel));
22372237

2238-
if((hhrtim->State == HAL_HRTIM_STATE_BUSY))
2238+
if (hhrtim->State == HAL_HRTIM_STATE_BUSY)
22392239
{
22402240
return HAL_BUSY;
22412241
}
2242-
if((hhrtim->State == HAL_HRTIM_STATE_READY))
2242+
if (hhrtim->State == HAL_HRTIM_STATE_READY)
22432243
{
2244-
if((SrcAddr == 0U ) || (DestAddr == 0U ) || (Length == 0U))
2244+
if ((SrcAddr == 0U ) || (DestAddr == 0U ) || (Length == 0U))
22452245
{
22462246
return HAL_ERROR;
22472247
}
@@ -5329,7 +5329,7 @@ HAL_StatusTypeDef HAL_HRTIM_WaveformCountStart_DMA(HRTIM_HandleTypeDef * hhrtim,
53295329
/* Check the parameters */
53305330
assert_param(IS_HRTIM_TIMERID(Timers));
53315331

5332-
if((hhrtim->State == HAL_HRTIM_STATE_BUSY))
5332+
if (hhrtim->State == HAL_HRTIM_STATE_BUSY)
53335333
{
53345334
return HAL_BUSY;
53355335
}
@@ -5764,13 +5764,13 @@ HAL_StatusTypeDef HAL_HRTIM_BurstDMATransfer(HRTIM_HandleTypeDef *hhrtim,
57645764
/* Check the parameters */
57655765
assert_param(IS_HRTIM_TIMERINDEX(TimerIdx));
57665766

5767-
if((hhrtim->State == HAL_HRTIM_STATE_BUSY))
5767+
if (hhrtim->State == HAL_HRTIM_STATE_BUSY)
57685768
{
57695769
return HAL_BUSY;
57705770
}
5771-
if((hhrtim->State == HAL_HRTIM_STATE_READY))
5771+
if (hhrtim->State == HAL_HRTIM_STATE_READY)
57725772
{
5773-
if((BurstBufferAddress == 0U ) || (BurstBufferLength == 0U))
5773+
if ((BurstBufferAddress == 0U ) || (BurstBufferLength == 0U))
57745774
{
57755775
return HAL_ERROR;
57765776
}

targets/TARGET_STM/TARGET_STM32H7/analogin_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void analogin_init(analogin_t *obj, PinName pin)
6060
// ADC Internal Channels "pins" (Temperature, Vref, Vbat, ...)
6161
// are described in PinNames.h and PeripheralPins.c
6262
// Pin value must be between 0xF0 and 0xFF
63-
if ((pin < 0xF0) || (pin >= ALT0)) {
63+
if ((pin < 0xF0) || (pin >= (PinName)ALT0)) {
6464
// Normal channels
6565
// Get the peripheral name from the pin and assign it to the object
6666
obj->handle.Instance = (ADC_TypeDef *)pinmap_peripheral(pin, PinMap_ADC);

0 commit comments

Comments
 (0)