Commit graph

9 commits

Author SHA1 Message Date
Finlay Davidson 96165a8541 Format header files
In my PR updating clang-format, I forgot to also format the headers.
2023-01-09 21:41:21 +01:00
Reinhold Gschweicher 129dd97b51 SpiNorFlash: use C++ style struct in C++ only header
`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>
2022-04-24 19:07:46 +03:00
Avamander 6989854519 Changed access modified indentation 2021-04-24 12:00:45 +03:00
Avamander 40d45d923b Reformatted all the files according to clang-format style 2021-04-24 11:39:53 +03:00
okaestne c3475b92fa
Include cleanup: drivers 2020-11-15 05:04:22 +01:00
JF f7e40b1b58 Re-implement sleep/wakeup for touch panel, display, NOR Flash, SPI and TWI. 2020-08-22 17:59:59 +02:00
JF de822cc3a2 Encapsulate DFU Image buffering and writing into spi flash in DfuImage.
Add some const in SPI driver.
2020-06-01 18:32:46 +02:00
JF ee05577dd6 Fix race conditions on SPI and integrate the SPI NOR Flash driver into DFUService (WIP) 2020-05-11 18:50:37 +02:00
JF 0b8e6c3fa2 Add SPI NOR Flash driver, WIP. 2020-05-07 19:53:51 +02:00