【ST NUCLEO-WBA52CG】第六篇 BLE测试3之 BLE APP点灯
<p><span style="font-family:宋体;"><span style="font-size:16px;"> </span></span></p><p > </p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;">看下初始化函数</span></span></p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;"> </span></span></p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;">UTIL_SEQ是一个通用的、可配置的任务调度器,它提供了一种简单而灵活的方法来管理多个任务</span></span></p>
<p > </p>
<p > </p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;">__USED void P2P_SERVER_Switch_c_SendNotification(void) /* Property Notification */函数里调用void P2P_SERVER_Notification(P2P_SERVER_NotificationEvt_t *p_Notification)来点灯.</span></span></p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;"> </span></span></p>
<p > </p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;">P2P_SERVER_Switch_c_SendNotification() function is called on Button B1 press, to notify the P2P Client:</span></span></p>
<p > </p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;">这里面还有个函数需要注意,在P2P_SERVER_Init()的函数里面调用了函数 SVCCTL_RegisterSvcHandler(P2P_SERVER_EventHandler),然后static SVCCTL_EvtAckStatus_t P2P_SERVER_EventHandler(void *p_Event)再调用P2P_SERVER_Notification</span></span></p>
<p > </p>
<p > </p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;">真正的点灯在void P2P_SERVER_Notification(P2P_SERVER_NotificationEvt_t *p_Notification)函数里,如下图所示</span></span></p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;">P2P_SERVER_LED_C_WRITE_NO_RESP_EVT event is received from the P2P Client</span></span></p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;"> </span></span></p>
<p > </p>
<p > </p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;">LED点亮,这个蓝色的LED灯这样拍是看不清楚的</span></span></p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;"> </span></span></p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;">换个模式看下,才能看清楚这个蓝色的LED</span></span></p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;"> </span></span></p>
<p > </p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;"> </span></span></p>
<p > </p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;"> </span></span></p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;">测试开始</span></span></p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;"> </span></span></p>
<p > </p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;"> </span></span></p>
<p > </p>
<p ><span style="font-family:宋体;"><span style="font-size:16px;"> </span></span></p>
<p>ST NUCLEO-WBA52CG的BLE可以作为主机不? </p>
页:
[1]