init
Dependencies: aconno_I2C Lis2dh12 WatchdogTimer
main.h
00001 /* 00002 ================================================================================ 00003 Project: GPS Tracker 00004 Module: --- 00005 Status: Development 00006 Type: .h header file 00007 Copyright (c) 2018 Pathfindr Ltd 00008 All Rights Reserved. 00009 ================================================================================ 00010 Notes: 00011 ================================================================================ 00012 */ 00013 #ifndef MAIN_INTERFACE_H_ 00014 #define MAIN_INTERFACE_H_ 00015 00016 //------------------------------------------------------------------------------ 00017 //FW DETAILS 00018 //------------------------------------------------------------------------------ 00019 #define FW_VERSION 1 00020 #define SKU "UWBBEACON" 00021 #define HW_MAJORREVISION "001" 00022 00023 //OPTIONS 00024 #define USE_NRF_TEMP_SENSOR false 00025 00026 //DEFAULT VELUES 00027 #define DEFAULT_SLEEP_FRAME 360000 // 6 mins 00028 #define DEFAULT_MOTION_G 7 00029 #define DEFAULT_MOTION_START_SECONDS 120 00030 #define DEFAULT_MOTION_STOP_SECONDS 120 00031 #define DEFAULT_IMPACT_G 127 00032 #define DEFAULT_BEACON_INTERVAL_MS 3000 00033 #define DEFAULT_BEACON_INTERVAL_FAST_MS 100 00034 #define DEFAULT_BEACON_POWER 4 //(accepted values are -40, -30, -20, -16, -12, -8, -4, 0, and 4 dBm) 00035 #define DEFAULT_SETTINGSSCANTIME_MS 10000 00036 00037 //CONSTS 00038 #define ONEDAYINSECONDS 86400 00039 #define THREEDAYSINSECONDS 259200 00040 #define SEVENDAYSINSECONDS 604800 00041 #define TENDAYSINSECONDS 864000 00042 00043 //DEFAULT EVENT TIMES IN SECONDS 00044 #define DEFAULT_INTERVAL_MOTIONCLEAR 60 00045 #define DEFAULT_INTERVAL_RESETACCINT 10 00046 #define DEFAULT_INTERVAL_BUTTONCLEAR 20 00047 #define DEFAULT_INTERVAL_BATTERY ONEDAYINSECONDS 00048 #define DEFAULT_INTERVAL_TEMPERATURE 60 00049 #define DEFAULT_INTERVAL_HUMIDITY 120 00050 #define DEFAULT_INTERVAL_SETTINGSSCAN 0 00051 00052 //DEFINES 00053 #define DEBUG_BUFFERSIZE 200 00054 00055 //------------------------------------------------------------------------------ 00056 //mbed Libraries 00057 //------------------------------------------------------------------------------ 00058 #include "mbed.h" 00059 //#include "nrf_soc.h" 00060 #include "board.h" 00061 #include "ble/BLE.h" 00062 00063 //------------------------------------------------------------------------------ 00064 //peripheral Libraries 00065 //------------------------------------------------------------------------------ 00066 #include "WatchdogTimer.h" 00067 #include "acd_nrf52_saadc.h" 00068 #include "DW1000.h" 00069 #include "MM2WayRanging.h" 00070 #include "Lis2dh12.h" 00071 #include "Lis2dh12_regs.h" 00072 00073 //------------------------------------------------------------------------------ 00074 //Application headers 00075 //------------------------------------------------------------------------------ 00076 #include "NRFuart.h" 00077 #include "app_data.h" 00078 #include "LED.h" 00079 00080 //BLE SERVICE IDS 00081 #define BLE_SERVICEID_PFDETECTOR2 0xfb40 00082 #define BLE_SERVICEID_UWBBEACON 0xfb50 00083 00084 //------------------------------------------------------------------------------ 00085 //Global macros 00086 //------------------------------------------------------------------------------ 00087 //#define lowByte(w) ((uint8_t) ((w) & 0xff)) 00088 //#define highByte(w) ((uint8_t) ((w) >> 8)) 00089 00090 //------------------------------------------------------------------------------ 00091 //GLOBAL VARS 00092 //------------------------------------------------------------------------------ 00093 00094 extern bool GLOBAL_accel_healthy; 00095 extern bool GLOBAL_requireSoftReset; 00096 extern bool GLOBAL_debugLED; 00097 extern bool GLOBAL_needToConfigureLis3dh; 00098 extern time_t GLOBAL_RTCunixtime; 00099 extern char GLOBAL_debug_buffer[DEBUG_BUFFERSIZE]; 00100 //FUNCS 00101 extern void watchdogKick(); 00102 #endif
Generated on Sat Jul 16 2022 03:03:28 by
1.7.2