- Silicon Labs Community
- Welcome and Announcements
- Silicon Labs Knowledge Base
- 8-bit MCU
- 32-bit MCU
- Bluetooth / Wi-Fi
- Other Products Category
- Optical/RH/Temp Sensor
- Other Products
- Hardware and Software Tools
- Simplicity Studio and Software
- General Discussions and Suggestions
- Chinese Forum
- Software Libraries
- Development Kits
- Reference Designs
- Third Party Tools
- White Papers
- Official Blog of Silicon Labs
- Chinese Blog
09-11-2017 11:21 PM
I have just start NCP mode project from two months ago.
I notice that "*gecko_rsp_msg = &_gecko_rsp_msg" in gecko_bglib.h.
But I don't see "_gecko_rsp_msg" where it was be operated even I find the key term with all path under SiliconLabs\SimplicityStudio\v4
Is it possible to know how does it work ?
Solved! Go to Solution.
09-12-2017 01:41 AM
_gecko_rsp_msg is the variable declaration, it appears in the code only once. (gecko_bglib.h)
In the rest of the code, this variable is referenced using this pointer:
struct gecko_cmd_packet *gecko_rsp_msg = &_gecko_rsp_msg;
If you search with keyword gecko_rsp_msg, you will find that this is used in gecko_bglib.c source file.
(located in: C:\SiliconLabs\SimplicityStudio\v4\developer\sdks\gecko_sdk_suite\v1.1\protocol\bluetooth_2.4\ble_stack\src\host\ )
It is referenced in function gecko_wait_message(). The return value of this function is a pointer to a BGAPI event. The code puts the response in the variable pointed by gecko_rsp_msg (= &_gecko_rsp_msg).