Other Parts Discussed in Thread: LAUNCHXL-CC2640R2
Tool/software: Code Composer Studio
Hello,
I want the cc2640r2 to send advering for 3 sec and stop sending for 6 second then repeat forever to save the power, how to modify the following code to do that?
void startAdvertising(void){
uint8_t advertEnabled = TRUE;
uint16_t advertDuration = 3;
GAP_SetParamValue(TGAP_LIM_ADV_TIMEOUT, advertDuration);
GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t), &advertEnabled);
}
1.Could you please help to provide the sudo code?
2. How can I verify the current status is at GAP_ADTYPE_FLAGS_LIMITED?
Many thanks,
Jack