-------------------------------------------------------simple_peripheral.c
// General discoverable mode: advertise indefinitely
#define DEFAULT_DISCOVERABLE_MODE GAP_ADTYPE_FLAGS_GENERAL
-------------------------------------------------------Gap.h
#define GAP_ADTYPE_FLAGS_LIMITED 0x01 //!< Discovery Mode: LE Limited Discoverable Mode
#define GAP_ADTYPE_FLAGS_GENERAL 0x02 //!< Discovery Mode: LE General Discoverable Mode
#define GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED 0x04 //!< Discovery Mode: BR/EDR Not Supported
-------------------------------------------------------peripheral.c
#define DEFAULT_ADVERT_OFF_TIME 30000 // 30 seconds
uint16_t advertOffTime = 0;
GAPRole_SetParameter(GAPROLE_ADVERT_OFF_TIME, sizeof(uint16_t),&advertOffTime);
-------------------------------------------------------Gap.h
/**
* @brief Minimum time to remain advertising, when in general discoverable mode (ms) Setting this parameter to 0 turns off the timeout, thus allowing infinite advertising
* 保持广告的最小时间,当一般可发现模式(ms)将该参数设置为0时,关闭超时,从而允许无限广告
* default: 0
*
* range: 0-65535
*/
#define TGAP_GEN_DISC_ADV_MIN 0
/**
* @brief Time to remain advertising in limited discovery mode (sec)
* 在有限的发现模式下(sec)继续做广告的时间
* default: 180
*
* range: 1-65535
*/
#define TGAP_LIM_ADV_TIMEOUT