Tool/software: Code Composer Studio
Hi,
I have created periodic timer to toggle advertising in Simple Broadcaster example.
void periodic_clock_callbc(void){
char status, value;
status = GAPRole_GetParameter(GAPROLE_ADVERT_ENABLED, &value);
uint8_t initialAdvertEnable;
if(value){
//Switch off advertisizng
initialAdvertEnable = 0;
GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t), &initialAdvertEnable);
}
if(!value){
//Switch off advertisizng
initialAdvertEnable = 1;
GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t), &initialAdvertEnable);
}
}
i have set this clock for every 5 second. I have set Inital advertising to be FALSE. For first clock interrupt it enables advertising mode. However after that its not stopping advertising mode even though it enters into if(value) loop.