#ifndef __UART_DEBUG
#define __UART_DEBUG
//you need add preposser define "UART_DEBUG"
#define DEBUG_OSAL  0x0001
#define DEBUG_APP  0x0002
#define DEBUG_HAL 0x0004
#define DEBUG_GAP 0x0008
#define DEBUG_GAPSEC 0x0010
#define DEBUG_GATT 0x0020

//select the debug layer
#define DEBUG_LAYER  0xFFFF

#define DEBUG_MSG  0xF0
//enum the message
typedef enum {
    uartdeg_osal=DEBUG_OSAL,
    uartdeg_app=DEBUG_APP,
    uartdeg_hal=DEBUG_HAL,
    uartdeg_gap=DEBUG_GAP,
    uartdeg_gapsec=DEBUG_GAPSEC,
    uartdeg_gatt=DEBUG_GATT 
}debug_type;

//define the debug message struct,with osal
//with osal_mem_alloc

typedef struct debug_message 
{
    osal_event_hdr_t hdr;  
    debug_type type;
    uint8 msg[10];
    int8  len;
}deg_msg_t;

extern deg_msg_t  *deg_msg;

#endif

