This commit is contained in:
lmx
2025-12-09 13:05:51 +08:00
parent c870b07b02
commit 23b14f0142
11 changed files with 312 additions and 279 deletions

View File

@ -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
}