init

Dependencies:   aconno_I2C Lis2dh12 WatchdogTimer

Revision:
34:4493c9f6d707
Parent:
33:760005331b4c
Child:
36:8e359069192b
--- a/main.h	Thu Jan 03 10:09:38 2019 +0000
+++ b/main.h	Sun Jan 13 23:40:56 2019 +0000
@@ -19,14 +19,18 @@
 //mbed Libraries
 //------------------------------------------------------------------------------
 #include "mbed.h"
+//#include "nrf_soc.h"
+#include "nrf_temp.h"
 #include "board.h"
-#include "WatchdogTimer.h"
 //#include "ble/BLE.h"
 //#include "nvstore.h"
+#include "FlashIAPBlockDevice.h"
+//#include "nrf_drv_uart.h"
 
 //------------------------------------------------------------------------------
 //peripheral Libraries
 //------------------------------------------------------------------------------
+#include "WatchdogTimer.h"
 #include "LIS3DH.h"
 #include "SI7060.h"
 #include "acd_nrf52_saadc.h"
@@ -34,6 +38,7 @@
 //------------------------------------------------------------------------------
 //Application headers
 //------------------------------------------------------------------------------
+#include "app_data.h"
 #include "states.h"
 #include "common.h"
 #include "sensors.h"
@@ -45,18 +50,21 @@
 //#define lowByte(w) ((uint8_t) ((w) & 0xff))
 //#define highByte(w) ((uint8_t) ((w) >> 8))
 
-#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. */
-#if CONSOLE_DEBUG
-#define DEBUG(...) { uart.printf(__VA_ARGS__); }
-#else
-#define DEBUG(...) /* nothing */
-#endif /* #if CONSOLE_DEBUG */
+#define DEBUG_ON                            1
 
 //------------------------------------------------------------------------------
 //Global data structures
 //------------------------------------------------------------------------------
 //PERFS
-extern Serial uart;
+extern void NRFuart_init_nohwfc();
+extern void NRFuart_uninit();
+extern void NRFuart_putc(char byte);
+extern void NRFuart_puts(char* bytes);
+extern char NRFuart_getc();
+extern void NRFuart_flush();
+extern bool NRFuart_readable();
+extern void debug_prep();
+extern void debug_exe();
 
 //VARS
 extern bool GLOBAL_accel_healthy;
@@ -69,6 +77,7 @@
 extern bool GLOBAL_LEDSequenceinProgress;
 extern time_t GLOBAL_RTCunixtime;
 extern time_t GLOBAL_wakeTime;
+extern char GLOBAL_debug_buffer[200];
 
 //FUNCS
 extern void watchdogKick();