TIM_DMADelayPulseCplt (HAL_TIM_DMADelayPulseCplt) was changed to static
in 1.7 or 1.8, but this will cause timer_hal.c which uses
HAL_TIM_DMADelayPulseCplt not to build.
Application of
Use union to access access size sensitive registers (7a0d3e7)
to V1.4.0
----
Note from "Use union to access access size sensitive registers (7a0d3e7)":
----
Use union to access access size sensitive registers
As described in RM0433 section 49.4.13 "Data packing", STM32H7's SPI data register supports data packing and it is sensitive to actual access width.
The original code used pointer casting to obtain a code to access the register in a desired size.
However, these operation results in strict aliasing warnings (deferencing punned pointer) and are not desirable.
Here, we declare a union that allow access to a 32-bit register in 8, 16 or 32-bit width and cast pointer to the original RXDR and TXDR data registers and then access the portion of the register through an appropriate union member.
XXX FIXME Only handled 16-bit access case, as 32-bit (original declaration) and 8-bit (allowed) cases do not generate warnings, but these should be handled similarly for correctness and consistency of the code.
- stm32h7xx_hal_rcc.c: Prevent signed-unsigned comparison warning
- [USBLIB] Take care of unused parameters
- [LIB] Stop signed-unsigned comparison warning (rcc_ex)
- Modify HAL SPI driver for const-ness to match call from current bus_spi driver
- [LIB] Handle unused in stm32h7xx_hal_flash.c
- UNUSED care for stm32h7xx_hal_rtc_ex.c
- UNUSED care for stm32h7xx_hal_pwr.c
- UNUSED care for stm32h7xx_hal_pcd.c
- UNUSED care for stm32h7xx_hal_flash.c
- UNUSED care for stm32h7xx_hal_adc_ex.c
As described in RM0433 section 49.4.13 "Data packing", STM32H7's SPI data register supports data packing and it is sensitive to actual access width.
The original code used pointer casting to obtain a code to access the register in a desired size.
However, these operation results in strict aliasing warnings (deferencing punned pointer) and are not desirable.
Here, we declare a union that allow access to a 32-bit register in 8, 16 or 32-bit width and cast pointer to the original RXDR and TXDR data registers and then access the portion of the register through an appropriate union member.
XXX FIXME Only handled 16-bit access case, as 32-bit (original declaration) and 8-bit (allowed) cases do not generate warnings, but these should be handled similarly for correctness and consistency of the code.