English
Language : 

AN91267 Datasheet, PDF (29/62 Pages) Ramtron International Corporation – Getting Started with PSoC
Getting Started with PSoC® 4 BLE
/* Advertisement event timed out, go to low power
* mode (Stop mode) and wait for device reset
* event to wake up the device again */
Advertising_LED_Write(LED_OFF);
Disconnect_LED_Write(LED_ON);
CySysPmSetWakeupPolarity(CY_PM_STOP_WAKEUP_ACTIVE_HIGH);
CySysPmStop();
/* Code execution will not reach here */
}
break;
default:
break;
}
}
BLE Service-Specific Event Handler
The BLE Component also generates events corresponding to each of the Services supported by your design. For the Find Me
Target application that you are creating, the BLE Component will generate IAS events that will let the application know if the
Alert Level Characteristic is updated with a new value. The flow chart and the firmware for handling BLE IAS events are shown
in Figure 40 and Code 3 respectively.
Figure 40. BLE IAS Event Handler Flow Chart
IAS
Event
Alert Level
updated?
No
Yes
Store updated Alert
Level Characteristic
Value
Return from IAS Event
Handler
www.cypress.com
Document No. 001-91267 Rev. *D
29