admin管理员组

文章数量:1550528

对ble_uart的例子,分析状态灯指示程序

控制状态的函数是bsp_indication_set(bsp_indication_t indicate);

状态主要在两个地方,一个是广播,一个是连接,所以,状态灯的函数在这两个回调函数中。

广播的回调函数在初始化advertising_init();的时候注册了


进入这个回调函数可以看到调用了bsp_indication_set(bsp_indication_t indicate);


连接的回调函数在派发函数中


进入这个函数,不同的上抛事件调用了bsp_indication_set(bsp_indication_t indicate);


接下来具体看这个函数bsp_indication_set(bsp_indication_t indicate);是怎么控制LED灯的。进入这个函数,其中调用了

bsp_led_indication(indicate);

本文标签: 状态程序