-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
H7_HAL/spi: Prevent strict alias error with 16-bit access of TX/RX regs.
Without this modification gcc will warn about violation of strict aliasing rules. It is crucial to be able to compile the HAL with the strict aliasing optimisation (-fstrict-aliasing) because the code can function incorrectly without using this optimisation (at least the SD card driver of the F4 HAL requires this optimisation). And the optimisation also brings noticeable savings in code size along with improved performance. So patching the code as is done here is important to allow the H7 HAL to be compiled with the optimisation enabled (and have no warnings/errors).
- Loading branch information
Showing
1 changed file
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters