/* ========================================
 *
 * Copyright YOUR COMPANY, THE YEAR
 * All Rights Reserved
 * UNPUBLISHED, LICENSED SOFTWARE.
 *
 * CONFIDENTIAL AND PROPRIETARY INFORMATION
 * WHICH IS THE PROPERTY OF your company.
 *
 * ========================================
*/
#ifndef BLE_PROCESS_H
#define BLE_PROCESS_H


/*****************************************************************************
* Included headers
*****************************************************************************/
#include <project.h>
#include "stdbool.h"

/*****************************************************************************
* Macros 
*****************************************************************************/
//#define CAPSENSE_SERVICE_INDEX          (CYBLE_CAPSENSE_SERVICE_SERVICE_INDEX)
#define RGB_LED_SERVICE_INDEX           (CYBLE_RGB_LED_SERVICE_SERVICE_INDEX)

//#define CAPSENSE_SLIDER_CHAR_INDEX      (CYBLE_CAPSENSE_SERVICE_CAPSENSE_SLIDER_CHARACTERISTIC_CHAR_INDEX)
#define RGB_LED_CHAR_INDEX              (CYBLE_RGB_LED_SERVICE_RGB_LED_CHARACTERISTIC_CHAR_INDEX)
//#define CAPSENSE_SLIDER_CHAR_HANDLE		(CYBLE_CAPSENSE_SERVICE_CAPSENSE_SLIDER_CHARACTERISTIC_CHAR_HANDLE)
#define RGB_LED_CHAR_HANDLE				(CYBLE_RGB_LED_SERVICE_RGB_LED_CHARACTERISTIC_CHAR_HANDLE)

    
#define ANIMATION_SERVICE_INDEX         (CYBLE_ANIMATION_SERVICE_SERVICE_INDEX)
#define ANIMATION_CHAR_INDEX            (CYBLE_ANIMATION_SERVICE_ANIMATION_CHARACTERISTIC_CHAR_INDEX)
#define ANIMATION_CHAR_HANDLE           (CYBLE_ANIMATION_SERVICE_ANIMATION_CHARACTERISTIC_CHAR_HANDLE)    
    
//#define CAPSENSE_CCC_HANDLE				(CYBLE_CAPSENSE_SERVICE_CAPSENSE_SLIDER_CHARACTERISTIC_CLIENT_CHARACTERISTIC_CONFIGURATION_DESC_HANDLE)

//#define CAPSENSE_SLIDER_CCC_INDEX		(CYBLE_CAPSENSE_SERVICE_CAPSENSE_SLIDER_CHARACTERISTIC_CLIENT_CHARACTERISTIC_CONFIGURATION_DESC_INDEX)
#define CCC_DATA_INDEX					(0u)

#define BLE_STATE_ADVERTISING			(0x01)
#define BLE_STATE_CONNECTED				(0x02)
#define BLE_STATE_DISCONNECTED			(0x00)

#define PASSIVE_LED_STATUS				(0xFF)

#define LED_ADV_BLINK_PERIOD			(40000)
#define LED_CONN_ON_PERIOD				(145000)

#define MTU_XCHANGE_DATA_LEN			(0x0020)


/*****************************************************************************
* Extern variables
*****************************************************************************/
extern uint8 deviceConnected;
extern uint8 showanimation;
//extern uint8 sendCapSenseSliderNotifications;
extern bool enterHibernateFlag;

/*****************************************************************************
* Public functions
*****************************************************************************/
void CustomEventHandler(uint32 event, void * eventParam);
void UpdateRGBled(void);
    
    
#endif
/* [] END OF FILE */
