/** ***************************************************************************************** * Copyright(c) 2016, Realtek Semiconductor Corporation. All rights reserved. ***************************************************************************************** * @file gap_msg.h * @brief This file contains function prototype for all GAP roles. * @details * @author ranhui * @date 2016-02-18 * @version v0.1 * ************************************************************************************* */ /*============================================================================* * Define to prevent recursive inclusion *============================================================================*/ #ifndef GAP_MSG_H #define GAP_MSG_H #ifdef __cplusplus extern "C" { #endif /*============================================================================* * Header Files *============================================================================*/ #include "upperstack_config.h" /** @defgroup GAP_MSG_MODULE GAP Message * @brief GAP message * @{ */ /*============================================================================* * Macros *============================================================================*/ /** @defgroup Gap_Msg_Exported_Macros GAP Msg Exported Macros * @{ */ /** @defgroup GAP_MSG_TYPE GAP BT Message Type Definitions * @brief Define the subtype of Message IO_MSG_TYPE_BT_STATUS. * @{ */ #define GAP_MSG_LE_DEV_STATE_CHANGE 0x01 //!< Device state change msg type. #define GAP_MSG_LE_CONN_STATE_CHANGE 0x02 //!< Connection state change msg type. #define GAP_MSG_LE_CONN_PARAM_UPDATE 0x03 //!< Connection parameter update changed msg type. #define GAP_MSG_LE_CONN_MTU_INFO 0x04 //!< Connection MTU size info msg type. #define GAP_MSG_LE_AUTHEN_STATE_CHANGE 0x05 //!< Authentication state change msg type. #define GAP_MSG_LE_BOND_PASSKEY_DISPLAY 0x06 //!< Bond passkey display msg type. #define GAP_MSG_LE_BOND_PASSKEY_INPUT 0x07 //!< Bond passkey input msg type. #define GAP_MSG_LE_BOND_OOB_INPUT 0x08 //!< Bond passkey oob input msg type. #define GAP_MSG_LE_BOND_USER_CONFIRMATION 0x09 //!< Bond user confirmation msg type. #define GAP_MSG_LE_BOND_JUST_WORK 0x0A //!< Bond user confirmation msg type. #if F_BT_LE_5_0_AE_ADV_SUPPORT #define GAP_MSG_LE_EXT_ADV_STATE_CHANGE 0x0B //!< Extended advertising state change msg type. #endif /** * @} */ /** @defgroup GAP_DEVICE_STATE GAP Device State * @{ */ /** @defgroup GAP_INIT_STATE GAP Initial State * @{ */ #define GAP_INIT_STATE_INIT 0 //!< Waiting to be started #define GAP_INIT_STATE_STACK_READY 1 //!< Stack is ready /** @} End GAP_INIT_STATE */ /** @defgroup GAP_ADV_STATE GAP Advertising State * @{ */ #define GAP_ADV_STATE_IDLE 0 //!< Idle, no advertising #define GAP_ADV_STATE_START 1 //!< Start Advertising. A temporary state, haven't received the result. #define GAP_ADV_STATE_ADVERTISING 2 //!< Advertising #define GAP_ADV_STATE_STOP 3 //!< Stop Advertising. A temporary state, haven't received the result. /** @} End GAP_ADV_STATE */ /** @defgroup GAP_ADV_SUB_STATE GAP Advertising Substate * @{ */ #define GAP_ADV_TO_IDLE_CAUSE_STOP 0 //!