summaryrefslogtreecommitdiff
path: root/src/drivers/SpiNorFlash.h
AgeCommit message (Collapse)AuthorFilesLines
2022-04-24SpiNorFlash: use C++ style struct in C++ only headerReinhold Gschweicher1-2/+2
`SpiNorFlash.h` is a C++ header, but the `Identification` struct is created in a C style using `typedef struct`. Clang issues a warining about this discrepancy: ``` In file included from /home/nero/repos/pinetime/InfiniSim/InfiniTime/src/systemtask/SystemTask.cpp:13: /home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:16:21: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage] typedef struct __attribute__((packed)) { ^ Identification /home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:17:9: note: type is not C-compatible due to this default member initializer uint8_t manufacturer = 0; ^~~~~~~~~~~~~~~~~~~~ /home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:20:9: note: type is given name 'Identification' for linkage purposes by this typedef declaration } Identification; ^ 1 warning generated. ``` The easy fix is to use a C++ style struct. Also includes code style fix from Riksu9000 Co-authored-by: Riku Isokoski <riksu9000@gmail.com>
2021-04-24Changed access modified indentationAvamander1-2/+2
2021-04-24Reformatted all the files according to clang-format styleAvamander1-52/+49
2020-11-15Include cleanup: driversokaestne1-0/+1
2020-08-22Re-implement sleep/wakeup for touch panel, display, NOR Flash, SPI and TWI.JF1-1/+3
2020-06-01Encapsulate DFU Image buffering and writing into spi flash in DfuImage.JF1-1/+1
Add some const in SPI driver.
2020-05-11Fix race conditions on SPI and integrate the SPI NOR Flash driver into ↵JF1-0/+32
DFUService (WIP)
2020-05-07Add SPI NOR Flash driver, WIP.JF1-0/+28