ble nano hid over gatt

Dependencies:   BLE_API mbed-dev nRF51822

config.h

Committer:
cho45
Date:
2016-09-02
Revision:
73:d36e0b817ebf
Parent:
69:9d6ecd584a0c
Child:
74:138d8c31f9f6

File content as of revision 73:d36e0b817ebf:

#ifndef __CONFIG_H__
#define __CONFIG_H__

#include "RawSerial.h"
extern RawSerial serial;

#define DEBUG 1
#define DEBUG_KEYEVENT 1
#define DEBUG_BLE 1
#define DEBUG_BLE_INTERRUPT 0

#if DEBUG_KEYEVENT
#define DEBUG_PRINTF_KEYEVENT(...) serial.printf(__VA_ARGS__)
#else
#define DEBUG_PRINTF_KEYEVENT(...)
#endif

#if DEBUG_BLE
#define DEBUG_PRINTF_BLE(...) serial.printf(__VA_ARGS__)
#else
#define DEBUG_PRINTF_BLE(...)
#endif

#if DEBUG_BLE_INTERRUPT
#define DEBUG_PRINTF_BLE_INTERRUPT(...) serial.printf(__VA_ARGS__)
#else
#define DEBUG_PRINTF_BLE_INTERRUPT(...)
#endif

// Generic DEBUG_PRINTF must not used at any interrupt
#if DEBUG
#define DEBUG_PRINTF(...) serial.printf(__VA_ARGS__)
#else
#define DEBUG_PRINTF(...)
#endif

#endif