init
Dependencies: aconno_I2C Lis2dh12 WatchdogTimer
main.h
- Committer:
- pathfindr
- Date:
- 2019-01-17
- Revision:
- 41:07e41dbd5304
- Parent:
- 38:476a9b5629a1
- Child:
- 43:7b232f03628f
File content as of revision 41:07e41dbd5304:
/* ================================================================================ Project: GPS Tracker Module: --- Status: Development Type: .h header file Copyright (c) 2018 Pathfindr Ltd All Rights Reserved. ================================================================================ Notes: ================================================================================ */ #ifndef MAIN_INTERFACE_H_ #define MAIN_INTERFACE_H_ //------------------------------------------------------------------------------ //DEFINES //------------------------------------------------------------------------------ #define FW_VERSION 21 #define SKU "GPSPLUS" #define HW_MAJORREVISION "001" //MODES #define USE_NRF_TEMP_SENSOR 1 #define DEBUG_ON 1 //DEFAULT SETTINGS #define DEFAULT_SLEEP_FRAME 60000 #define DEFAULT_FORCE2G true #define DEFAULT_LOCATION_MODE 2 #define DEFAULT_LOCATION_ACCURACY 2 // 0 = no location, 1 = cl only, 2 = gps then cl #define DEFAULT_LOCATION_TX_INTERVAL_MINS 1440 #define DEFAULT_LOCATION_TX_FAILSAFE_HRS 168 #define DEFAULT_LOCATION_TIMEOUT 180 #define DEFAULT_MOTION_G 11 #define DEFAULT_MOTION_START_SECONDS 120 #define DEFAULT_MOTION_STOP_SECONDS 120 #define DEFAULT_IMPACT_G 127 #define DEFAULT_CONNECTION_ATTEMPTS 1 #define DEFAULT_CONNECTION_TIMEOUT 180 #define DEFAULT_BEACON_INTERVAL_SECONDS 10 //CONSTS #define ONEDAYINSECONDS 86400 #define THREEDAYSINSECONDS 259200 #define SEVENDAYSINSECONDS 604800 #define TENDAYSINSECONDS 864000 //------------------------------------------------------------------------------ //mbed Libraries //------------------------------------------------------------------------------ #include "mbed.h" //#include "nrf_soc.h" #include "nrf_temp.h" #include "board.h" //#include "ble/BLE.h" //#include "nvstore.h" #include "FlashIAPBlockDevice.h" //------------------------------------------------------------------------------ //peripheral Libraries //------------------------------------------------------------------------------ #include "WatchdogTimer.h" #include "LIS3DH.h" #include "SI7060.h" #include "acd_nrf52_saadc.h" //------------------------------------------------------------------------------ //Application headers //------------------------------------------------------------------------------ #include "NRFuart.h" #include "app_data.h" #include "states.h" #include "common.h" #include "sensors.h" #include "modem.h" //------------------------------------------------------------------------------ //Global macros //------------------------------------------------------------------------------ //#define lowByte(w) ((uint8_t) ((w) & 0xff)) //#define highByte(w) ((uint8_t) ((w) >> 8)) //------------------------------------------------------------------------------ //GLOBAL VARS //------------------------------------------------------------------------------ extern bool GLOBAL_accel_healthy; extern bool GLOBAL_requireSoftReset; extern bool GLOBAL_motionFlagTriggered; extern bool GLOBAL_debugLED; extern bool GLOBAL_needToConfigureLis3dh; extern bool GLOBAL_registeredOnNetwork; extern bool GLOBAL_modemOn; extern bool GLOBAL_LEDSequenceinProgress; extern time_t GLOBAL_RTCunixtime; extern time_t GLOBAL_wakeTime; extern char GLOBAL_debug_buffer[200]; extern bool RET_force2G; //FUNCS extern void watchdogKick(); #endif