diff --git a/source/app/main.c b/source/app/main.c index 96ee0b6..dd894ef 100644 --- a/source/app/main.c +++ b/source/app/main.c @@ -135,11 +135,15 @@ void main(void) #endif //初始化 L0_main_init(); - //验证加密信息 - //L3_encrypt_handler(); - //主循环 - // L0_board_config(); - // bsp_key_init(); + + //上电延时方便输出 + delayInMs(1000); + + //获取mcuid + L0_id_get_chipid(); + L0_uart0_sendArrayHex(mcuid, MSP_ID_LEN); + L0_uart0_0d0a(); + while(1) { if(1 == s_nos_tick.t1s_heatbeart) @@ -161,13 +165,15 @@ void main(void) L0_uart0_uchex(key); } + //NFC协议处理 + L3_task_nfc_handler(&_s_task_nfc); + //串口调试 // if(ts_uart3_recv_buf.ok == 1){ // // count++; // ts_uart3_recv_buf.ok = 0; // L0_uart0_uchex(ts_uart3_recv_buf.reg); // } - L3_task_nfc_handler(&_s_task_nfc); //L1_ADS1213_main(); diff --git a/source/bsp/chipid.c b/source/bsp/chipid.c index 0800da0..e2a6935 100644 --- a/source/bsp/chipid.c +++ b/source/bsp/chipid.c @@ -12,30 +12,34 @@ #include "chipid.h" #include "../bsp/bsp_config.h" -void L0_id_get_ram(U8 *id) +U8 mcuid[MSP_ID_LEN]; + +void L0_id_get_ram() { U8 i = 0; for(i=0;i