init
Dependencies: aconno_I2C Lis2dh12 WatchdogTimer
main.h@21:e0b866630c27, 2018-12-20 (annotated)
- Committer:
- pathfindr
- Date:
- Thu Dec 20 22:04:45 2018 +0000
- Revision:
- 21:e0b866630c27
- Parent:
- 20:5404841fdd2b
- Child:
- 22:810425eb76e1
rr
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pathfindr | 0:94b743e06998 | 1 | /* |
pathfindr | 0:94b743e06998 | 2 | ================================================================================ |
pathfindr | 21:e0b866630c27 | 3 | Project: GPS Tracker |
pathfindr | 0:94b743e06998 | 4 | Module: --- |
pathfindr | 0:94b743e06998 | 5 | Status: Development |
pathfindr | 0:94b743e06998 | 6 | Type: .h header file |
pathfindr | 0:94b743e06998 | 7 | Copyright (c) 2018 Pathfindr Ltd |
pathfindr | 0:94b743e06998 | 8 | All Rights Reserved. |
pathfindr | 0:94b743e06998 | 9 | ================================================================================ |
pathfindr | 0:94b743e06998 | 10 | Notes: |
pathfindr | 0:94b743e06998 | 11 | |
pathfindr | 0:94b743e06998 | 12 | ================================================================================ |
pathfindr | 0:94b743e06998 | 13 | */ |
pathfindr | 0:94b743e06998 | 14 | |
pathfindr | 0:94b743e06998 | 15 | #ifndef MAIN_INTERFACE_H_ |
pathfindr | 0:94b743e06998 | 16 | #define MAIN_INTERFACE_H_ |
pathfindr | 0:94b743e06998 | 17 | |
pathfindr | 0:94b743e06998 | 18 | //------------------------------------------------------------------------------ |
pathfindr | 0:94b743e06998 | 19 | //mbed Libraries |
pathfindr | 0:94b743e06998 | 20 | //------------------------------------------------------------------------------ |
pathfindr | 0:94b743e06998 | 21 | #include "mbed.h" |
pathfindr | 7:e9a19750700d | 22 | #include "board.h" |
pathfindr | 4:8d8e9bfa82e4 | 23 | #include "WatchdogTimer.h" |
pathfindr | 0:94b743e06998 | 24 | #include "ble/BLE.h" |
pathfindr | 7:e9a19750700d | 25 | //#include "nvstore.h" |
pathfindr | 0:94b743e06998 | 26 | |
pathfindr | 0:94b743e06998 | 27 | //------------------------------------------------------------------------------ |
pathfindr | 2:fd554f01abdf | 28 | //peripheral Libraries |
pathfindr | 0:94b743e06998 | 29 | //------------------------------------------------------------------------------ |
pathfindr | 0:94b743e06998 | 30 | #include "LIS3DH.h" |
pathfindr | 11:60eb0ff945f2 | 31 | #include "SI7060.h" |
pathfindr | 14:9a54b1b65bc8 | 32 | #include "acd_nrf52_saadc.h" |
pathfindr | 0:94b743e06998 | 33 | |
pathfindr | 0:94b743e06998 | 34 | //------------------------------------------------------------------------------ |
pathfindr | 0:94b743e06998 | 35 | //Application headers |
pathfindr | 0:94b743e06998 | 36 | //------------------------------------------------------------------------------ |
pathfindr | 16:3bf5f1a5f869 | 37 | #include "states.h" |
pathfindr | 7:e9a19750700d | 38 | #include "common.h" |
pathfindr | 7:e9a19750700d | 39 | #include "sensors.h" |
pathfindr | 7:e9a19750700d | 40 | #include "modem.h" |
pathfindr | 5:8f8951127724 | 41 | |
pathfindr | 0:94b743e06998 | 42 | //------------------------------------------------------------------------------ |
pathfindr | 0:94b743e06998 | 43 | //Global macros |
pathfindr | 0:94b743e06998 | 44 | //------------------------------------------------------------------------------ |
pathfindr | 16:3bf5f1a5f869 | 45 | //#define lowByte(w) ((uint8_t) ((w) & 0xff)) |
pathfindr | 16:3bf5f1a5f869 | 46 | //#define highByte(w) ((uint8_t) ((w) >> 8)) |
pathfindr | 0:94b743e06998 | 47 | |
pathfindr | 11:60eb0ff945f2 | 48 | #define CONSOLE_DEBUG 1 /* Set this if you need debug messages on the console; * it will have an impact on code-size and power consumption. */ |
pathfindr | 11:60eb0ff945f2 | 49 | #if CONSOLE_DEBUG |
pathfindr | 0:94b743e06998 | 50 | #define DEBUG(...) { uart.printf(__VA_ARGS__); } |
pathfindr | 0:94b743e06998 | 51 | #else |
pathfindr | 0:94b743e06998 | 52 | #define DEBUG(...) /* nothing */ |
pathfindr | 11:60eb0ff945f2 | 53 | #endif /* #if CONSOLE_DEBUG */ |
pathfindr | 0:94b743e06998 | 54 | |
pathfindr | 0:94b743e06998 | 55 | //------------------------------------------------------------------------------ |
pathfindr | 0:94b743e06998 | 56 | //Global data structures |
pathfindr | 0:94b743e06998 | 57 | //------------------------------------------------------------------------------ |
pathfindr | 13:29f67f256709 | 58 | //PERFS |
pathfindr | 13:29f67f256709 | 59 | extern Serial uart; |
pathfindr | 0:94b743e06998 | 60 | |
pathfindr | 7:e9a19750700d | 61 | //VARS |
pathfindr | 13:29f67f256709 | 62 | extern bool GLOBAL_accel_healthy; |
pathfindr | 13:29f67f256709 | 63 | extern bool GLOBAL_requireSoftReset; |
pathfindr | 13:29f67f256709 | 64 | extern bool GLOBAL_motionFlagTriggered; |
pathfindr | 13:29f67f256709 | 65 | extern bool GLOBAL_debugLED; |
pathfindr | 13:29f67f256709 | 66 | extern bool GLOBAL_needToConfigureLis3dh; |
pathfindr | 13:29f67f256709 | 67 | extern bool GLOBAL_registeredOnNetwork; |
pathfindr | 13:29f67f256709 | 68 | extern long long GLOBAL_imei; |
pathfindr | 13:29f67f256709 | 69 | extern float GLOBAL_voltage; |
pathfindr | 13:29f67f256709 | 70 | extern time_t GLOBAL_RTCunixtime; |
pathfindr | 13:29f67f256709 | 71 | extern time_t GLOBAL_wakeTime; |
pathfindr | 20:5404841fdd2b | 72 | |
pathfindr | 20:5404841fdd2b | 73 | //FUNCS |
pathfindr | 20:5404841fdd2b | 74 | extern void watchdogKick(); |
pathfindr | 20:5404841fdd2b | 75 | |
pathfindr | 16:3bf5f1a5f869 | 76 | #endif |