cun
This commit is contained in:
@ -125,7 +125,7 @@ void rc_rfid_callback_handler(void *priv)
|
||||
*/
|
||||
void rc_ble_callback_handler(void *priv)
|
||||
{
|
||||
u8 read_uid[UID_LENGTH] = 0;
|
||||
u8 read_uid[UID_LENGTH] = {0};
|
||||
nvs_read_main_board_mac(read_uid); //读nvs
|
||||
|
||||
//读到的是当前连接的主板uid
|
||||
@ -261,4 +261,27 @@ void rc_app_main_init(void)
|
||||
g_ble_timer_id = sys_timer_add(NULL, rc_ble_callback_handler, RC_BLE_CALLBACK_INTERVAL_MS);
|
||||
rc_log("BLE handler timer started (ID: %d).\n", g_ble_timer_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//test
|
||||
#define TEST_FUNCTION 1
|
||||
void test_task(void){
|
||||
#if TEST_FUNCTION == 1
|
||||
while(1){
|
||||
u8 uid[UID_LENGTH] = {0};
|
||||
//读id卡
|
||||
TYPE_V_EVENT((char *)uid);
|
||||
// TYPE_A_EVENT((char *)uid);
|
||||
|
||||
os_time_dly(10);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
void test_func_main(void){
|
||||
#if TEST_FUNCTION == 1
|
||||
os_task_create(test_task, NULL, 1, 1024, 128, "rfid_test");
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user