summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2021-01-04 18:56:56 (GMT)
committerGitea <gitea@fake.local>2021-01-04 18:56:56 (GMT)
commit1d940af924bac5728a4d494f780e298e5b67b707 (patch)
tree24540888f3d038ca3c88a0789b63faa8ac07d631 /src/components
parent04abc91f157f5925ffa404728291a69893acf8cf (diff)
parent50ae0ae5e073ac48652e6c26549f9b19655e8da3 (diff)
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/components')
-rw-r--r--src/components/battery/BatteryController.cpp3
-rw-r--r--src/components/battery/BatteryController.h2
-rw-r--r--src/components/ble/AlertNotificationClient.cpp10
-rw-r--r--src/components/ble/AlertNotificationClient.h14
-rw-r--r--src/components/ble/AlertNotificationService.cpp13
-rw-r--r--src/components/ble/AlertNotificationService.h10
-rw-r--r--src/components/ble/BatteryInformationService.h4
-rw-r--r--src/components/ble/BleController.cpp2
-rw-r--r--src/components/ble/BleController.h3
-rw-r--r--src/components/ble/CurrentTimeClient.cpp3
-rw-r--r--src/components/ble/CurrentTimeClient.h10
-rw-r--r--src/components/ble/CurrentTimeService.h4
-rw-r--r--src/components/ble/DeviceInformationService.h9
-rw-r--r--src/components/ble/DfuService.cpp4
-rw-r--r--src/components/ble/DfuService.h4
-rw-r--r--src/components/ble/ImmediateAlertService.cpp6
-rw-r--r--src/components/ble/ImmediateAlertService.h4
-rw-r--r--src/components/ble/MusicService.cpp2
-rw-r--r--src/components/ble/MusicService.h7
-rw-r--r--src/components/ble/NimbleController.cpp24
-rw-r--r--src/components/ble/NimbleController.h23
-rw-r--r--src/components/ble/NotificationManager.cpp2
-rw-r--r--src/components/ble/NotificationManager.h4
-rw-r--r--src/components/ble/ServiceDiscovery.cpp4
-rw-r--r--src/components/ble/ServiceDiscovery.h6
-rw-r--r--src/components/brightness/BrightnessController.cpp2
-rw-r--r--src/components/firmwarevalidator/FirmwareValidator.cpp6
-rw-r--r--src/components/gfx/Gfx.cpp20
-rw-r--r--src/components/gfx/Gfx.h12
29 files changed, 135 insertions, 82 deletions
diff --git a/src/components/battery/BatteryController.cpp b/src/components/battery/BatteryController.cpp
index 571efae..3e3d65b 100644
--- a/src/components/battery/BatteryController.cpp
+++ b/src/components/battery/BatteryController.cpp
@@ -1,8 +1,7 @@
-#include <drivers/include/nrfx_saadc.h>
+#include "BatteryController.h"
#include <hal/nrf_gpio.h>
#include <libraries/log/nrf_log.h>
#include <algorithm>
-#include "BatteryController.h"
using namespace Pinetime::Controllers;
diff --git a/src/components/battery/BatteryController.h b/src/components/battery/BatteryController.h
index f07648a..7cc964e 100644
--- a/src/components/battery/BatteryController.h
+++ b/src/components/battery/BatteryController.h
@@ -1,7 +1,7 @@
#pragma once
+#include <cstdint>
#include <drivers/include/nrfx_saadc.h>
-
namespace Pinetime {
namespace Controllers {
class Battery {
diff --git a/src/components/ble/AlertNotificationClient.cpp b/src/components/ble/AlertNotificationClient.cpp
index abe4109..e7a1862 100644
--- a/src/components/ble/AlertNotificationClient.cpp
+++ b/src/components/ble/AlertNotificationClient.cpp
@@ -1,7 +1,7 @@
-#include <systemtask/SystemTask.h>
-#include "NotificationManager.h"
-
#include "AlertNotificationClient.h"
+#include <algorithm>
+#include "NotificationManager.h"
+#include "systemtask/SystemTask.h"
using namespace Pinetime::Controllers;
constexpr ble_uuid16_t AlertNotificationClient::ansServiceUuid;
@@ -159,8 +159,8 @@ void AlertNotificationClient::OnNotification(ble_gap_event *event) {
const auto maxBufferSize{maxMessageSize + headerSize};
const auto dbgPacketLen = OS_MBUF_PKTLEN(event->notify_rx.om);
- size_t bufferSize = min(dbgPacketLen + stringTerminatorSize, maxBufferSize);
- auto messageSize = min(maxMessageSize, (bufferSize - headerSize));
+ size_t bufferSize = std::min(dbgPacketLen + stringTerminatorSize, maxBufferSize);
+ auto messageSize = std::min(maxMessageSize, (bufferSize - headerSize));
NotificationManager::Notification notif;
os_mbuf_copydata(event->notify_rx.om, headerSize, messageSize - 1, notif.message.data());
diff --git a/src/components/ble/AlertNotificationClient.h b/src/components/ble/AlertNotificationClient.h
index bc0df51..fa10456 100644
--- a/src/components/ble/AlertNotificationClient.h
+++ b/src/components/ble/AlertNotificationClient.h
@@ -1,13 +1,23 @@
#pragma once
#include <cstdint>
-#include <array>
+#include <functional>
+#define min // workaround: nimble's min/max macros conflict with libstdc++
+#define max
#include <host/ble_gap.h>
+#undef max
+#undef min
#include "BleClient.h"
-
namespace Pinetime {
+
+ namespace System {
+ class SystemTask;
+ }
+
namespace Controllers {
+ class NotificationManager;
+
class AlertNotificationClient : public BleClient {
public:
explicit AlertNotificationClient(Pinetime::System::SystemTask &systemTask,
diff --git a/src/components/ble/AlertNotificationService.cpp b/src/components/ble/AlertNotificationService.cpp
index 32711b9..3156470 100644
--- a/src/components/ble/AlertNotificationService.cpp
+++ b/src/components/ble/AlertNotificationService.cpp
@@ -1,10 +1,9 @@
-
-#include <hal/nrf_rtc.h>
-#include "NotificationManager.h"
-#include <systemtask/SystemTask.h>
-
#include "AlertNotificationService.h"
+#include <hal/nrf_rtc.h>
#include <cstring>
+#include <algorithm>
+#include "NotificationManager.h"
+#include "systemtask/SystemTask.h"
using namespace Pinetime::Controllers;
@@ -60,8 +59,8 @@ int AlertNotificationService::OnAlert(uint16_t conn_handle, uint16_t attr_handle
const auto maxBufferSize{maxMessageSize + headerSize};
const auto dbgPacketLen = OS_MBUF_PKTLEN(ctxt->om);
- size_t bufferSize = min(dbgPacketLen + stringTerminatorSize, maxBufferSize);
- auto messageSize = min(maxMessageSize, (bufferSize-headerSize));
+ size_t bufferSize = std::min(dbgPacketLen + stringTerminatorSize, maxBufferSize);
+ auto messageSize = std::min(maxMessageSize, (bufferSize-headerSize));
NotificationManager::Notification notif;
os_mbuf_copydata(ctxt->om, headerSize, messageSize-1, notif.message.data());
diff --git a/src/components/ble/AlertNotificationService.h b/src/components/ble/AlertNotificationService.h
index 1b8c498..120312d 100644
--- a/src/components/ble/AlertNotificationService.h
+++ b/src/components/ble/AlertNotificationService.h
@@ -1,10 +1,20 @@
#pragma once
#include <cstdint>
#include <array>
+#define min // workaround: nimble's min/max macros conflict with libstdc++
+#define max
#include <host/ble_gap.h>
+#undef max
+#undef min
namespace Pinetime {
+
+ namespace System {
+ class SystemTask;
+ }
namespace Controllers {
+ class NotificationManager;
+
class AlertNotificationService {
public:
AlertNotificationService(Pinetime::System::SystemTask &systemTask,
diff --git a/src/components/ble/BatteryInformationService.h b/src/components/ble/BatteryInformationService.h
index 74b2222..b00000a 100644
--- a/src/components/ble/BatteryInformationService.h
+++ b/src/components/ble/BatteryInformationService.h
@@ -1,5 +1,9 @@
#pragma once
+#define min // workaround: nimble's min/max macros conflict with libstdc++
+#define max
#include <host/ble_gap.h>
+#undef max
+#undef min
namespace Pinetime {
namespace System {
diff --git a/src/components/ble/BleController.cpp b/src/components/ble/BleController.cpp
index 2b396e1..650ec79 100644
--- a/src/components/ble/BleController.cpp
+++ b/src/components/ble/BleController.cpp
@@ -1,5 +1,3 @@
-#include <cstring>
-#include <cstdlib>
#include "BleController.h"
using namespace Pinetime::Controllers;
diff --git a/src/components/ble/BleController.h b/src/components/ble/BleController.h
index 3f52ea2..0570c8d 100644
--- a/src/components/ble/BleController.h
+++ b/src/components/ble/BleController.h
@@ -1,8 +1,7 @@
#pragma once
-#include <FreeRTOS.h>
-#include <queue.h>
#include <array>
+#include <cstdint>
namespace Pinetime {
namespace Controllers {
diff --git a/src/components/ble/CurrentTimeClient.cpp b/src/components/ble/CurrentTimeClient.cpp
index 92f9374..be50fed 100644
--- a/src/components/ble/CurrentTimeClient.cpp
+++ b/src/components/ble/CurrentTimeClient.cpp
@@ -1,5 +1,6 @@
-#include <hal/nrf_rtc.h>
#include "CurrentTimeClient.h"
+#include <hal/nrf_rtc.h>
+#include "components/datetime/DateTimeController.h"
using namespace Pinetime::Controllers;
diff --git a/src/components/ble/CurrentTimeClient.h b/src/components/ble/CurrentTimeClient.h
index 9313939..1b2e018 100644
--- a/src/components/ble/CurrentTimeClient.h
+++ b/src/components/ble/CurrentTimeClient.h
@@ -1,13 +1,15 @@
#pragma once
+#define min // workaround: nimble's min/max macros conflict with libstdc++
+#define max
+#include <host/ble_gap.h>
+#undef max
+#undef min
#include <cstdint>
-#include <array>
-
-#include "components/datetime/DateTimeController.h"
#include "BleClient.h"
-#include <host/ble_gap.h>
namespace Pinetime {
namespace Controllers {
+ class DateTime;
class CurrentTimeClient : public BleClient {
public:
diff --git a/src/components/ble/CurrentTimeService.h b/src/components/ble/CurrentTimeService.h
index a6be964..2395628 100644
--- a/src/components/ble/CurrentTimeService.h
+++ b/src/components/ble/CurrentTimeService.h
@@ -3,7 +3,11 @@
#include <array>
#include "components/datetime/DateTimeController.h"
+#define min // workaround: nimble's min/max macros conflict with libstdc++
+#define max
#include <host/ble_gap.h>
+#undef max
+#undef min
namespace Pinetime {
namespace Controllers {
diff --git a/src/components/ble/DeviceInformationService.h b/src/components/ble/DeviceInformationService.h
index 25ab840..94ca7bb 100644
--- a/src/components/ble/DeviceInformationService.h
+++ b/src/components/ble/DeviceInformationService.h
@@ -1,9 +1,10 @@
#pragma once
-#include <cstdint>
-#include <array>
-
+#define min // workaround: nimble's min/max macros conflict with libstdc++
+#define max
#include <host/ble_gap.h>
-#include <Version.h>
+#undef max
+#undef min
+#include "Version.h"
namespace Pinetime {
namespace Controllers {
diff --git a/src/components/ble/DfuService.cpp b/src/components/ble/DfuService.cpp
index 4dec514..90795b4 100644
--- a/src/components/ble/DfuService.cpp
+++ b/src/components/ble/DfuService.cpp
@@ -1,8 +1,8 @@
+#include "DfuService.h"
#include <cstring>
-
#include "components/ble/BleController.h"
+#include "drivers/SpiNorFlash.h"
#include "systemtask/SystemTask.h"
-#include "DfuService.h"
using namespace Pinetime::Controllers;
diff --git a/src/components/ble/DfuService.h b/src/components/ble/DfuService.h
index d7ba460..096bd99 100644
--- a/src/components/ble/DfuService.h
+++ b/src/components/ble/DfuService.h
@@ -3,7 +3,11 @@
#include <cstdint>
#include <array>
+#define min // workaround: nimble's min/max macros conflict with libstdc++
+#define max
#include <host/ble_gap.h>
+#undef max
+#undef min
namespace Pinetime {
namespace System {
diff --git a/src/components/ble/ImmediateAlertService.cpp b/src/components/ble/ImmediateAlertService.cpp
index e2cee30..0f6bf6c 100644
--- a/src/components/ble/ImmediateAlertService.cpp
+++ b/src/components/ble/ImmediateAlertService.cpp
@@ -1,7 +1,7 @@
-#include <systemtask/SystemTask.h>
-#include <cstring>
#include "ImmediateAlertService.h"
-#include "AlertNotificationService.h"
+#include <cstring>
+#include "NotificationManager.h"
+#include "systemtask/SystemTask.h"
using namespace Pinetime::Controllers;
diff --git a/src/components/ble/ImmediateAlertService.h b/src/components/ble/ImmediateAlertService.h
index c42846c..2bc9cba 100644
--- a/src/components/ble/ImmediateAlertService.h
+++ b/src/components/ble/ImmediateAlertService.h
@@ -1,5 +1,9 @@
#pragma once
+#define min // workaround: nimble's min/max macros conflict with libstdc++
+#define max
#include <host/ble_gap.h>
+#undef max
+#undef min
namespace Pinetime {
namespace System {
diff --git a/src/components/ble/MusicService.cpp b/src/components/ble/MusicService.cpp
index 84f2972..fdecb6b 100644
--- a/src/components/ble/MusicService.cpp
+++ b/src/components/ble/MusicService.cpp
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-#include <systemtask/SystemTask.h>
#include "MusicService.h"
+#include "systemtask/SystemTask.h"
int MSCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt *ctxt, void *arg) {
auto musicService = static_cast<Pinetime::Controllers::MusicService *>(arg);
diff --git a/src/components/ble/MusicService.h b/src/components/ble/MusicService.h
index b365909..ee3628b 100644
--- a/src/components/ble/MusicService.h
+++ b/src/components/ble/MusicService.h
@@ -18,10 +18,13 @@
#pragma once
#include <cstdint>
-#include <array>
+#include <string>
+#define min // workaround: nimble's min/max macros conflict with libstdc++
+#define max
#include <host/ble_gap.h>
#include <host/ble_uuid.h>
-#include <string>
+#undef max
+#undef min
//c7e50000-78fc-48fe-8e23-43b37a1942d0
#define MUSIC_SERVICE_UUID_BASE {0xd0, 0x42, 0x19, 0x3a, 0x3b, 0x43, 0x23, 0x8e, 0xfe, 0x48, 0xfc, 0x78, 0x00, 0x00, 0xe5, 0xc7}
diff --git a/src/components/ble/NimbleController.cpp b/src/components/ble/NimbleController.cpp
index af7f402..a6f3cc3 100644
--- a/src/components/ble/NimbleController.cpp
+++ b/src/components/ble/NimbleController.cpp
@@ -1,15 +1,19 @@
-#include "components/datetime/DateTimeController.h"
-#include <systemtask/SystemTask.h>
-#include "components/ble/NotificationManager.h"
-#include <hal/nrf_rtc.h>
#include "NimbleController.h"
-#include "MusicService.h"
-#include <services/gatt/ble_svc_gatt.h>
-#include <services/gap/ble_svc_gap.h>
-#include <host/util/util.h>
-#include <host/ble_hs_id.h>
-#include <host/ble_hs.h>
+#include <hal/nrf_rtc.h>
+#define min // workaround: nimble's min/max macros conflict with libstdc++
+#define max
#include <host/ble_gap.h>
+#include <host/ble_hs.h>
+#include <host/ble_hs_id.h>
+#include <host/util/util.h>
+#undef max
+#undef min
+#include <services/gap/ble_svc_gap.h>
+#include <services/gatt/ble_svc_gatt.h>
+#include "components/ble/BleController.h"
+#include "components/ble/NotificationManager.h"
+#include "components/datetime/DateTimeController.h"
+#include "systemtask/SystemTask.h"
using namespace Pinetime::Controllers;
diff --git a/src/components/ble/NimbleController.h b/src/components/ble/NimbleController.h
index 8ddec1f..914f11e 100644
--- a/src/components/ble/NimbleController.h
+++ b/src/components/ble/NimbleController.h
@@ -2,24 +2,35 @@
#include <cstdint>
-#include "AlertNotificationService.h"
+#define min // workaround: nimble's min/max macros conflict with libstdc++
+#define max
+#include <host/ble_gap.h>
+#undef max
+#undef min
#include "AlertNotificationClient.h"
-#include "DeviceInformationService.h"
+#include "AlertNotificationService.h"
+#include "BatteryInformationService.h"
#include "CurrentTimeClient.h"
-#include "DfuService.h"
#include "CurrentTimeService.h"
-#include "MusicService.h"
-#include "BatteryInformationService.h"
+#include "DeviceInformationService.h"
+#include "DfuService.h"
#include "ImmediateAlertService.h"
+#include "MusicService.h"
#include "ServiceDiscovery.h"
-#include <host/ble_gap.h>
namespace Pinetime {
namespace Drivers {
class SpiNorFlash;
}
+
+ namespace System {
+ class SystemTask;
+ }
+
namespace Controllers {
+ class Ble;
class DateTime;
+ class NotificationManager;
class NimbleController {
diff --git a/src/components/ble/NotificationManager.cpp b/src/components/ble/NotificationManager.cpp
index 6771172..dabcb4b 100644
--- a/src/components/ble/NotificationManager.cpp
+++ b/src/components/ble/NotificationManager.cpp
@@ -1,6 +1,6 @@
+#include "NotificationManager.h"
#include <cstring>
#include <algorithm>
-#include "NotificationManager.h"
using namespace Pinetime::Controllers;
diff --git a/src/components/ble/NotificationManager.h b/src/components/ble/NotificationManager.h
index 49fe830..036d2ed 100644
--- a/src/components/ble/NotificationManager.h
+++ b/src/components/ble/NotificationManager.h
@@ -2,6 +2,8 @@
#include <array>
#include <atomic>
+#include <cstddef>
+#include <cstdint>
namespace Pinetime {
namespace Controllers {
@@ -27,7 +29,7 @@ namespace Pinetime {
bool ClearNewNotificationFlag();
bool AreNewNotificationsAvailable();
- static constexpr uint8_t MaximumMessageSize() { return MessageSize; };
+ static constexpr size_t MaximumMessageSize() { return MessageSize; };
size_t NbNotifications() const;
private:
diff --git a/src/components/ble/ServiceDiscovery.cpp b/src/components/ble/ServiceDiscovery.cpp
index 4b29d89..4d37b8b 100644
--- a/src/components/ble/ServiceDiscovery.cpp
+++ b/src/components/ble/ServiceDiscovery.cpp
@@ -1,5 +1,7 @@
-#include <libraries/log/nrf_log.h>
#include "ServiceDiscovery.h"
+#include <libraries/log/nrf_log.h>
+#include "BleClient.h"
+
using namespace Pinetime::Controllers;
ServiceDiscovery::ServiceDiscovery(std::array<BleClient*, 2>&& clients) : clients{clients} {
diff --git a/src/components/ble/ServiceDiscovery.h b/src/components/ble/ServiceDiscovery.h
index c86fc4e..0b26bd1 100644
--- a/src/components/ble/ServiceDiscovery.h
+++ b/src/components/ble/ServiceDiscovery.h
@@ -1,12 +1,12 @@
#pragma once
#include <array>
-#include <functional>
-#include <memory>
-#include "BleClient.h"
+#include <cstdint>
namespace Pinetime {
namespace Controllers {
+ class BleClient;
+
class ServiceDiscovery {
public:
ServiceDiscovery(std::array<BleClient*, 2>&& bleClients);
diff --git a/src/components/brightness/BrightnessController.cpp b/src/components/brightness/BrightnessController.cpp
index c8825d6..78c461d 100644
--- a/src/components/brightness/BrightnessController.cpp
+++ b/src/components/brightness/BrightnessController.cpp
@@ -1,5 +1,5 @@
-#include <hal/nrf_gpio.h>
#include "BrightnessController.h"
+#include <hal/nrf_gpio.h>
using namespace Pinetime::Controllers;
diff --git a/src/components/firmwarevalidator/FirmwareValidator.cpp b/src/components/firmwarevalidator/FirmwareValidator.cpp
index 244d5c0..48f9855 100644
--- a/src/components/firmwarevalidator/FirmwareValidator.cpp
+++ b/src/components/firmwarevalidator/FirmwareValidator.cpp
@@ -1,8 +1,8 @@
-#include <drivers/InternalFlash.h>
-#include <hal/nrf_rtc.h>
-
#include "FirmwareValidator.h"
+#include <hal/nrf_rtc.h>
+#include "drivers/InternalFlash.h"
+
using namespace Pinetime::Controllers;
bool FirmwareValidator::IsValidated() const {
diff --git a/src/components/gfx/Gfx.cpp b/src/components/gfx/Gfx.cpp
index 3c5dbfb..59c1da9 100644
--- a/src/components/gfx/Gfx.cpp
+++ b/src/components/gfx/Gfx.cpp
@@ -1,8 +1,5 @@
-#include <libraries/svc/nrf_svci.h>
-#include <FreeRTOS.h>
-#include <task.h>
#include "Gfx.h"
-#include "../../drivers/St7789.h"
+#include "drivers/St7789.h"
using namespace Pinetime::Components;
Gfx::Gfx(Pinetime::Drivers::St7789 &lcd) : lcd{lcd} {
@@ -23,7 +20,7 @@ void Gfx::ClearScreen() {
lcd.BeginDrawBuffer(0, 0, width, height);
lcd.NextDrawBuffer(reinterpret_cast<const uint8_t *>(buffer), width * 2);
- WaitTransfertFinished();
+ WaitTransferFinished();
}
@@ -40,7 +37,7 @@ void Gfx::FillRectangle(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint16_t col
lcd.BeginDrawBuffer(x, y, w, h);
lcd.NextDrawBuffer(reinterpret_cast<const uint8_t *>(buffer), width * 2);
- WaitTransfertFinished();
+ WaitTransferFinished();
}
void Gfx::FillRectangle(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t* b) {
@@ -54,7 +51,7 @@ void Gfx::FillRectangle(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t* b)
lcd.BeginDrawBuffer(x, y, w, h);
lcd.NextDrawBuffer(reinterpret_cast<const uint8_t *>(b), width * 2);
- WaitTransfertFinished();
+ WaitTransferFinished();
}
void Gfx::DrawString(uint8_t x, uint8_t y, uint16_t color, const char *text, const FONT_INFO *p_font, bool wrap) {
@@ -125,7 +122,7 @@ void Gfx::DrawChar(const FONT_INFO *font, uint8_t c, uint8_t *x, uint8_t y, uint
lcd.BeginDrawBuffer(*x, y, bytes_in_line*8, font->height);
lcd.NextDrawBuffer(reinterpret_cast<const uint8_t *>(&buffer), bytes_in_line*8*2);
- WaitTransfertFinished();
+ WaitTransferFinished();
*x += font->charInfo[char_idx].widthBits + font->spacePixels;
}
@@ -153,7 +150,7 @@ bool Gfx::GetNextBuffer(uint8_t **data, size_t &size) {
state.remainingIterations--;
if (state.remainingIterations == 0) {
state.busy = false;
- NotifyEndOfTransfert(state.taskToNotify);
+ NotifyEndOfTransfer(state.taskToNotify);
return false;
}
@@ -185,7 +182,7 @@ bool Gfx::GetNextBuffer(uint8_t **data, size_t &size) {
return true;
}
-void Gfx::NotifyEndOfTransfert(TaskHandle_t task) {
+void Gfx::NotifyEndOfTransfer(TaskHandle_t task) {
if(task != nullptr) {
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
vTaskNotifyGiveFromISR(task, &xHigherPriorityTaskWoken);
@@ -193,7 +190,7 @@ void Gfx::NotifyEndOfTransfert(TaskHandle_t task) {
}
}
-void Gfx::WaitTransfertFinished() const {
+void Gfx::WaitTransferFinished() const {
ulTaskNotifyTake(pdTRUE, 500);
}
@@ -204,4 +201,3 @@ void Gfx::SetScrollArea(uint16_t topFixedLines, uint16_t scrollLines, uint16_t b
void Gfx::SetScrollStartLine(uint16_t line) {
lcd.VerticalScrollStartAddress(line);
}
-
diff --git a/src/components/gfx/Gfx.h b/src/components/gfx/Gfx.h
index 091f06f..4c0fc8e 100644
--- a/src/components/gfx/Gfx.h
+++ b/src/components/gfx/Gfx.h
@@ -1,10 +1,10 @@
#pragma once
-#include <cstdint>
-#include <nrf_font.h>
-#include <drivers/BufferProvider.h>
#include <FreeRTOS.h>
+#include <nrf_font.h>
#include <task.h>
-
+#include <cstddef>
+#include <cstdint>
+#include "drivers/BufferProvider.h"
namespace Pinetime {
namespace Drivers {
@@ -53,8 +53,8 @@ namespace Pinetime {
Drivers::St7789& lcd;
void SetBackgroundColor(uint16_t color);
- void WaitTransfertFinished() const;
- void NotifyEndOfTransfert(TaskHandle_t task);
+ void WaitTransferFinished() const;
+ void NotifyEndOfTransfer(TaskHandle_t task);
};
}
}