diff options
| author | JF <jf@codingfield.com> | 2020-09-26 15:09:24 (GMT) |
|---|---|---|
| committer | Gitea <gitea@fake.local> | 2020-09-26 15:09:24 (GMT) |
| commit | b6a910e52ed98b662e6586f45cfe9c6997f8f158 (patch) | |
| tree | d74185cbf682cde40e5de5bfa2f620ae201565a9 /src/graphics.cpp | |
| parent | be05997272b7b1d1b25b122c8162ac6f4c1c12a2 (diff) | |
| parent | 3e612e79ba82bac69258094d468c996c41b29612 (diff) | |
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/graphics.cpp')
| -rw-r--r-- | src/graphics.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp index 3b53703..9373a9b 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -79,6 +79,7 @@ void Process(void* instance) { NRF_LOG_INFO("Init..."); spi.Init(); spiNorFlash.Init(); + spiNorFlash.Wakeup(); brightnessController.Init(); lcd.Init(); gfx.Init(); @@ -103,10 +104,10 @@ void Process(void* instance) { static constexpr uint32_t screenWidth = 240; static constexpr uint32_t screenWidthInBytes = screenWidth*2; // LCD display 16bits color (1 pixel = 2 bytes) uint16_t displayLineBuffer[screenWidth]; - for(int line = 0; line < screenWidth; line++) { + for(uint32_t line = 0; line < screenWidth; line++) { spiNorFlash.Read(line*screenWidthInBytes, reinterpret_cast<uint8_t *>(displayLineBuffer), screenWidth); spiNorFlash.Read((line*screenWidthInBytes)+screenWidth, reinterpret_cast<uint8_t *>(displayLineBuffer) + screenWidth, screenWidth); - for(int col = 0; col < screenWidth; col++) { + for(uint32_t col = 0; col < screenWidth; col++) { gfx.pixel_draw(col, line, displayLineBuffer[col]); } } |
