文档地址
http://www.ti.com/product/CC2540/technicaldocuments
http://www.ti.com/lit/pdf/swru271
CC2540/41 Bluetooth Low Energy Software Developer’s Guide (Rev. G)
5.2 GAPRole Task
As in Section 3.1, the GAPRole task is a separate task (GAPRole_ProcessEvent) that simplifies the
application by handling most of the GAP layer functionality. This task is enabled and configured by the
application during initialization. Based on this configuration, many BLE protocol stack events are handled
directly by the GAPRole task and never passed to the application. Callbacks exist that the application can
register with the GAPRole task. This registration notifies the GAPRole task of certain events. See
Section B.3.1 for peripheral events