1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 03:50:02 +03:00
Commit graph

10 commits

Author SHA1 Message Date
jflyper
0c5540228f Simple fixes to library files
- 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
2019-04-28 05:55:01 +09:00
jflyper
7a0d3e73f5 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.
2019-04-28 05:55:01 +09:00
jflyper
8670c05068 SPI HAL library bug (referencing RX side handle from TX only DMA) 2019-04-28 05:55:01 +09:00
Dominic Clifton
844683279a STM32H750 - Apply workaround to the SDMMC Errata 2.11.4
Issue: "Consecutive multiple block transfers can induce incorrect data length"
Workaround: "8 SDMMC clock cycles must elapse before DTEN can be set."
2019-04-28 05:55:01 +09:00
Dominic Clifton
adcf556ea5 STM32H750 - Fix for H750 Errata 2.11.5. 2019-04-28 05:55:00 +09:00
Dominic Clifton
a545abc511 Fix compilation error in H7 HAL library when enabling QSPI. 2019-04-28 05:55:00 +09:00
jflyper
99ea236bc2 Take care of "FLASH_SIZE" constant for stm32h750xx.h in lib 2019-04-28 05:54:36 +09:00
jflyper
e124693d48 [LIB] stm32h7xx_hal_def.h : Include <stddef.h> instead of <stdio.h>
Inclusion of <stdio.h> produces poisoned function alert for sprintf and
variants.
F7 use <stddef.h> instead of <stdio.h>
2019-04-25 12:01:42 +09:00
jflyper
22dd78f247 [CMSIS] stm32h743xx.h: FLASH_SIZE def collide with Betaflight 2019-04-25 12:01:42 +09:00
jflyper
5f15f58aa6 Import STM32Cube_FW_H7_V1.3.0 2019-04-21 18:39:03 +09:00