init
Dependencies: aconno_I2C Lis2dh12 WatchdogTimer
main.h@7:e9a19750700d, 2018-12-11 (annotated)
- Committer:
- pathfindr
- Date:
- Tue Dec 11 22:18:24 2018 +0000
- Revision:
- 7:e9a19750700d
- Parent:
- 6:388d3c7efdd9
- Child:
- 11:60eb0ff945f2
init
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| pathfindr | 0:94b743e06998 | 1 | /* |
| pathfindr | 0:94b743e06998 | 2 | ================================================================================ |
| pathfindr | 0:94b743e06998 | 3 | Project: MTU 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 | 0:94b743e06998 | 28 | //------------------------------------------------------------------------------ |
| pathfindr | 2:fd554f01abdf | 29 | //peripheral Libraries |
| pathfindr | 0:94b743e06998 | 30 | //------------------------------------------------------------------------------ |
| pathfindr | 0:94b743e06998 | 31 | #include "LIS3DH.h" |
| pathfindr | 0:94b743e06998 | 32 | |
| pathfindr | 0:94b743e06998 | 33 | |
| pathfindr | 0:94b743e06998 | 34 | //------------------------------------------------------------------------------ |
| pathfindr | 0:94b743e06998 | 35 | //C Standard Libraries |
| pathfindr | 0:94b743e06998 | 36 | //------------------------------------------------------------------------------ |
| pathfindr | 2:fd554f01abdf | 37 | /* |
| pathfindr | 0:94b743e06998 | 38 | #include <ctype.h> |
| pathfindr | 0:94b743e06998 | 39 | #include <errno.h> |
| pathfindr | 0:94b743e06998 | 40 | #include <stddef.h> |
| pathfindr | 0:94b743e06998 | 41 | #include <math.h> |
| pathfindr | 0:94b743e06998 | 42 | #include <stdarg.h> |
| pathfindr | 0:94b743e06998 | 43 | #include <stdlib.h> |
| pathfindr | 0:94b743e06998 | 44 | #include <stdio.h> |
| pathfindr | 0:94b743e06998 | 45 | #include <ctype.h> |
| pathfindr | 0:94b743e06998 | 46 | #include <string.h> |
| pathfindr | 0:94b743e06998 | 47 | #include <stdbool.h> |
| pathfindr | 0:94b743e06998 | 48 | #include <stdint.h> |
| pathfindr | 2:fd554f01abdf | 49 | */ |
| pathfindr | 2:fd554f01abdf | 50 | //include <string> // dont use - causes 2ma sleep |
| pathfindr | 2:fd554f01abdf | 51 | //using std::string; |
| pathfindr | 2:fd554f01abdf | 52 | |
| pathfindr | 0:94b743e06998 | 53 | //------------------------------------------------------------------------------ |
| pathfindr | 0:94b743e06998 | 54 | //Application headers |
| pathfindr | 0:94b743e06998 | 55 | //------------------------------------------------------------------------------ |
| pathfindr | 0:94b743e06998 | 56 | #include "modes.h" |
| pathfindr | 7:e9a19750700d | 57 | #include "common.h" |
| pathfindr | 7:e9a19750700d | 58 | #include "sensors.h" |
| pathfindr | 7:e9a19750700d | 59 | #include "modem.h" |
| pathfindr | 5:8f8951127724 | 60 | |
| pathfindr | 0:94b743e06998 | 61 | //------------------------------------------------------------------------------ |
| pathfindr | 0:94b743e06998 | 62 | //Global macros |
| pathfindr | 0:94b743e06998 | 63 | //------------------------------------------------------------------------------ |
| pathfindr | 0:94b743e06998 | 64 | #define lowByte(w) ((uint8_t) ((w) & 0xff)) |
| pathfindr | 0:94b743e06998 | 65 | #define highByte(w) ((uint8_t) ((w) >> 8)) |
| pathfindr | 0:94b743e06998 | 66 | |
| pathfindr | 7:e9a19750700d | 67 | #define NEED_CONSOLE_OUTPUT 0 /* Set this if you need debug messages on the console; * it will have an impact on code-size and power consumption. */ |
| pathfindr | 0:94b743e06998 | 68 | #if NEED_CONSOLE_OUTPUT |
| pathfindr | 0:94b743e06998 | 69 | #define DEBUG(...) { uart.printf(__VA_ARGS__); } |
| pathfindr | 0:94b743e06998 | 70 | #else |
| pathfindr | 0:94b743e06998 | 71 | #define DEBUG(...) /* nothing */ |
| pathfindr | 0:94b743e06998 | 72 | #endif /* #if NEED_CONSOLE_OUTPUT */ |
| pathfindr | 0:94b743e06998 | 73 | |
| pathfindr | 0:94b743e06998 | 74 | //------------------------------------------------------------------------------ |
| pathfindr | 0:94b743e06998 | 75 | //Global data structures |
| pathfindr | 0:94b743e06998 | 76 | //------------------------------------------------------------------------------ |
| pathfindr | 0:94b743e06998 | 77 | |
| pathfindr | 7:e9a19750700d | 78 | //VARS |
| pathfindr | 7:e9a19750700d | 79 | extern bool requireSoftReset; |
| pathfindr | 0:94b743e06998 | 80 | |
| pathfindr | 0:94b743e06998 | 81 | #endif |