| Electronic Components Datasheet Search |
|
UM1770 Datasheet(PDF) 10 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM1770 Datasheet(HTML) 10 Page - STMicroelectronics |
|
10 / 56 page ![]() Execution context UM1770 10/56 DocID026385 Rev 2 3 Execution context The BlueNRG host profiles framework implements a single task model for execution. The entire processing takes place in the ISR context and the main thread context. The execution context is a while(1) loop. The following functions are processed in this loop: 1. HCI_Process(): it performs the processing of any pending events read. It is defined on file hci.c (ACI Framework); 2. Profile_Process(): it sends the commands during the initialization or pairing process and updates the main profile state machine.It is defined on file profile.c (main profile file); 3. Profile specific state machine: it is called for checking current main profile and profile state, substate and performing related actions and consequent status updates (functions *_StateMachine(void) on each specific profile); 4. Application state machine: it performs application-specific handling (sending data to profiles, enabling advertising, displaying to the user, etc.). An example of such function is the Host_Profile_Test_Application() defined within the profiles_test_application.c file (test application for profile PTS validation). The PTS profile validation application (profiles_test_application.c) provides an example of such processing. The BlueNRG events are notified to the main profile application (profile.c) through the HCI_Event_CB() callback which performs the required actions based on main profile state and substate. Further the HCI_Event_CB() function notifies the BlueNRG events to a specific profile by calling the profile callback function * _Event_Handler(). This function is called with the following instruction: gMainProfileCtxt.bleProfileApplNotifyFunc(appNotifEvt,1,&appNotifStatus); Each profile registers its BlueNRG event handler function (* _Event_Handler()) through the profile *_Init() function. Following are more details about the main profile framework (profile.c) key functions: • BLE_Profile_Init(): It initializes the main profile. • BLE_Profiles_Evt_Notify_Cb(): it is the main profile callback function which is called by each profile to notify the profile specific events to the main profile application. Based on such events, main profile application can decide which actions to take in order to handle the specific profile events. This function is provided to each profile when the related *_Init() API is called. • BLE_Profile_Register_Profile(): it allows registration of each profile callback; it is called within the profile initialization function named: *_Init() function. Profile specific example: heart rate profile • Heart rate profile header file: heart_rate.h file; • Heart rate profile initialization function:HRProfile_Init(). This function performs the following operations: • Set the main profile callback function for notifying profile specific events to the main profile application; • Set the heart rate profile HRProfile_Rx_Event_Handler() callback function; • Register the heart rate with BLE main Profile. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |