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