summaryrefslogtreecommitdiff
path: root/src/main.cpp
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/main.cpp
parent04abc91f157f5925ffa404728291a69893acf8cf (diff)
parent50ae0ae5e073ac48652e6c26549f9b19655e8da3 (diff)
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp54
1 files changed, 33 insertions, 21 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 45aac6d..3505704 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,32 +1,44 @@
-#include <FreeRTOS.h>
-#include <task.h>
-#include <timers.h>
-#include <legacy/nrf_drv_clock.h>
+// nrf
#include <hal/nrf_rtc.h>
#include <hal/nrf_wdt.h>
-#include <os/os_cputime.h>
-#include <libraries/timer/app_timer.h>
+#include <legacy/nrf_drv_clock.h>
#include <libraries/gpiote/app_gpiote.h>
-#include "displayapp/DisplayApp.h"
+#include <libraries/timer/app_timer.h>
#include <softdevice/common/nrf_sdh.h>
-#include "components/datetime/DateTimeController.h"
-#include "components/battery/BatteryController.h"
-#include "components/ble/BleController.h"
-#include "components/ble/NotificationManager.h"
-#include <drivers/St7789.h>
-#include <drivers/SpiMaster.h>
-#include <drivers/Spi.h>
-#include "displayapp/LittleVgl.h"
-#include <systemtask/SystemTask.h>
-#include <nimble/nimble_port_freertos.h>
-#include <nimble/npl_freertos.h>
-#include <nimble/nimble_port.h>
-#include <host/ble_hs.h>
+
+// nimble
+#define min // workaround: nimble's min/max macros conflict with libstdc++
+#define max
#include <controller/ble_ll.h>
-#include <transport/ram/ble_hci_ram.h>
+#include <host/ble_hs.h>
#include <host/util/util.h>
+#include <nimble/nimble_port.h>
+#include <nimble/nimble_port_freertos.h>
+#include <nimble/npl_freertos.h>
+#include <os/os_cputime.h>
#include <services/gap/ble_svc_gap.h>
+#include <transport/ram/ble_hci_ram.h>
+#undef max
+#undef min
+
+// FreeRTOS
+#include <FreeRTOS.h>
+#include <task.h>
+#include <timers.h>
+#include "components/battery/BatteryController.h"
+#include "components/ble/BleController.h"
+#include "components/ble/NotificationManager.h"
+#include "components/datetime/DateTimeController.h"
+#include "displayapp/DisplayApp.h"
+#include "displayapp/LittleVgl.h"
+#include "drivers/Spi.h"
+#include "drivers/SpiMaster.h"
+#include "drivers/SpiNorFlash.h"
+#include "drivers/St7789.h"
+#include "drivers/TwiMaster.h"
+#include "drivers/Cst816s.h"
+#include "systemtask/SystemTask.h"
#if NRF_LOG_ENABLED
#include "logging/NrfLogger.h"