BLE fota Lamp Demo
Dependencies: mbed-rtos mbed mbed_fota_fan_control
Fork of mbed_fota_fan_control by
Diff: dialog_fota/app.cpp
- Revision:
- 3:1e70387e1337
- Child:
- 4:60be78a172c2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dialog_fota/app.cpp Tue Jun 23 06:32:40 2015 +0000 @@ -0,0 +1,23 @@ +#include "app.h" +#include "gapm_task.h" +#include "dialog_fota_config.h" + + +namespace sevencore_fota{ + +void app_rst_gap(BleMsgHandler *BMH) +{ + struct gapm_reset_cmd gm_cmd; + gm_cmd.operation = GAPM_RESET; + uint8_t *msg; + unsigned short msg_size = 1+sizeof(ble_hdr) + sizeof(gapm_reset_cmd); + msg = new uint8_t[msg_size]; + BMH->BleMsgAlloc(GAPM_RESET_CMD, TASK_GAPM, TASK_GTL, + sizeof(struct gapm_reset_cmd),&gm_cmd,msg); + + BMH->BleSendMsg(msg,msg_size); + + return; +} + +}//namespace