init
Dependencies: aconno_I2C Lis2dh12 WatchdogTimer
main.h@34:4493c9f6d707, 2019-01-13 (annotated)
- Committer:
- pathfindr
- Date:
- Sun Jan 13 23:40:56 2019 +0000
- Revision:
- 34:4493c9f6d707
- Parent:
- 33:760005331b4c
- Child:
- 36:8e359069192b
init
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 | 34:4493c9f6d707 | 22 | //#include "nrf_soc.h" |
pathfindr | 34:4493c9f6d707 | 23 | #include "nrf_temp.h" |
pathfindr | 7:e9a19750700d | 24 | #include "board.h" |
pathfindr | 24:c161db07557f | 25 | //#include "ble/BLE.h" |
pathfindr | 7:e9a19750700d | 26 | //#include "nvstore.h" |
pathfindr | 34:4493c9f6d707 | 27 | #include "FlashIAPBlockDevice.h" |
pathfindr | 34:4493c9f6d707 | 28 | //#include "nrf_drv_uart.h" |
pathfindr | 0:94b743e06998 | 29 | |
pathfindr | 0:94b743e06998 | 30 | //------------------------------------------------------------------------------ |
pathfindr | 2:fd554f01abdf | 31 | //peripheral Libraries |
pathfindr | 0:94b743e06998 | 32 | //------------------------------------------------------------------------------ |
pathfindr | 34:4493c9f6d707 | 33 | #include "WatchdogTimer.h" |
pathfindr | 0:94b743e06998 | 34 | #include "LIS3DH.h" |
pathfindr | 11:60eb0ff945f2 | 35 | #include "SI7060.h" |
pathfindr | 14:9a54b1b65bc8 | 36 | #include "acd_nrf52_saadc.h" |
pathfindr | 0:94b743e06998 | 37 | |
pathfindr | 0:94b743e06998 | 38 | //------------------------------------------------------------------------------ |
pathfindr | 0:94b743e06998 | 39 | //Application headers |
pathfindr | 0:94b743e06998 | 40 | //------------------------------------------------------------------------------ |
pathfindr | 34:4493c9f6d707 | 41 | #include "app_data.h" |
pathfindr | 16:3bf5f1a5f869 | 42 | #include "states.h" |
pathfindr | 7:e9a19750700d | 43 | #include "common.h" |
pathfindr | 7:e9a19750700d | 44 | #include "sensors.h" |
pathfindr | 7:e9a19750700d | 45 | #include "modem.h" |
pathfindr | 5:8f8951127724 | 46 | |
pathfindr | 0:94b743e06998 | 47 | //------------------------------------------------------------------------------ |
pathfindr | 0:94b743e06998 | 48 | //Global macros |
pathfindr | 0:94b743e06998 | 49 | //------------------------------------------------------------------------------ |
pathfindr | 16:3bf5f1a5f869 | 50 | //#define lowByte(w) ((uint8_t) ((w) & 0xff)) |
pathfindr | 16:3bf5f1a5f869 | 51 | //#define highByte(w) ((uint8_t) ((w) >> 8)) |
pathfindr | 0:94b743e06998 | 52 | |
pathfindr | 34:4493c9f6d707 | 53 | #define DEBUG_ON 1 |
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 | 34:4493c9f6d707 | 59 | extern void NRFuart_init_nohwfc(); |
pathfindr | 34:4493c9f6d707 | 60 | extern void NRFuart_uninit(); |
pathfindr | 34:4493c9f6d707 | 61 | extern void NRFuart_putc(char byte); |
pathfindr | 34:4493c9f6d707 | 62 | extern void NRFuart_puts(char* bytes); |
pathfindr | 34:4493c9f6d707 | 63 | extern char NRFuart_getc(); |
pathfindr | 34:4493c9f6d707 | 64 | extern void NRFuart_flush(); |
pathfindr | 34:4493c9f6d707 | 65 | extern bool NRFuart_readable(); |
pathfindr | 34:4493c9f6d707 | 66 | extern void debug_prep(); |
pathfindr | 34:4493c9f6d707 | 67 | extern void debug_exe(); |
pathfindr | 0:94b743e06998 | 68 | |
pathfindr | 7:e9a19750700d | 69 | //VARS |
pathfindr | 13:29f67f256709 | 70 | extern bool GLOBAL_accel_healthy; |
pathfindr | 13:29f67f256709 | 71 | extern bool GLOBAL_requireSoftReset; |
pathfindr | 13:29f67f256709 | 72 | extern bool GLOBAL_motionFlagTriggered; |
pathfindr | 13:29f67f256709 | 73 | extern bool GLOBAL_debugLED; |
pathfindr | 13:29f67f256709 | 74 | extern bool GLOBAL_needToConfigureLis3dh; |
pathfindr | 13:29f67f256709 | 75 | extern bool GLOBAL_registeredOnNetwork; |
pathfindr | 22:810425eb76e1 | 76 | extern bool GLOBAL_modemOn; |
pathfindr | 33:760005331b4c | 77 | extern bool GLOBAL_LEDSequenceinProgress; |
pathfindr | 13:29f67f256709 | 78 | extern time_t GLOBAL_RTCunixtime; |
pathfindr | 13:29f67f256709 | 79 | extern time_t GLOBAL_wakeTime; |
pathfindr | 34:4493c9f6d707 | 80 | extern char GLOBAL_debug_buffer[200]; |
pathfindr | 20:5404841fdd2b | 81 | |
pathfindr | 20:5404841fdd2b | 82 | //FUNCS |
pathfindr | 20:5404841fdd2b | 83 | extern void watchdogKick(); |
pathfindr | 20:5404841fdd2b | 84 | |
pathfindr | 16:3bf5f1a5f869 | 85 | #endif |