Crazy-Geeks / STM32-W25Q-QSPI

STM32 Winbond W25Q memory Quad SPI Driver
https://crazy-geeks.github.io/STM32-W25Q-QSPI/
MIT License
80 stars 27 forks source link

binary literals #8

Open csrichter opened 1 year ago

csrichter commented 1 year ago

w25q_mem.c often includes the line "buf_reg |= 0b10;"

according to this post https://stackoverflow.com/questions/2611764/can-i-use-a-binary-literal-in-c-or-c#2611883 that is only possible in C++ since C++14

i suggest replacing the binary literals with hex literals to support C and older C++ compilers

the IAR compiler (in C mode) gave the following unhelpful error message: Error[Pe065]: expected a ";"