Lizzy project

Dependencies:   aconno_I2C Lis2dh12 adc52832_common aconno_SEGGER_RTT

source/main.h

Committer:
dbartolovic
Date:
2018-08-29
Branch:
axis_normal
Revision:
16:482d8f81d6f3
Parent:
15:c0c01188a29b
Child:
23:bf9c1dd2b5cb

File content as of revision 16:482d8f81d6f3:

/*
 *   Made by Jurica Resetar @ aconno
 *   More info @ aconno.de
 *
 */

#ifndef MAIN_H
#define MAIN_H
 
#include "mbed.h"
#include "Lis2dh12.h"
#include "Lis2dh12_regs.h"
#include "aconno_ble.h"
#include "ble/BLE.h"
#include "GapAdvertisingData.h"
#include "acd52832_bsp.h"

#define DEBUG               (0)
#define PRINT_ON_RTT        (0)
#define DEBUG_LED           (0)
#define NANO_MODULE         (0)
#define NORMAL_AXIS         (1)
//#define LSB_VALUE           (192)

#define BLE_ACTIVE_TIME_S   (0.4)
#define POWER_UP_DELAY_MS   (200)


#if PRINT_ON_RTT
    #include "SEGGER_RTT.h"
    #define printf(...)                      SEGGER_RTT_printf(0, __VA_ARGS__)
#else
    #define printf(...)
#endif

#define INT1_THRESHOLD      (30)
#define INT1_DUR            (12)
    
#define ACC_INT_SIG         (0x00001020)    // Acc interrupt signal
#define DISABLE_BLE_SIG     (0x00001030)


extern Thread bleT;
extern Thread measureT;
extern Thread updateServiceT;
extern Thread updateBuzzLedsT;

void disableI2C();

#endif