From 6c2039ff700e8990bf0382801cba55c8e5bbb6ee Mon Sep 17 00:00:00 2001 From: "mr.zhangsan" Date: Tue, 18 Jun 2024 00:59:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=BD=8E=E5=8A=9F=E8=80=97?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E5=85=B3=E9=97=ADrfid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/app/app_config.c | 12 ++++++++++++ source/app/task_low_power.c | 3 +++ 2 files changed, 15 insertions(+) diff --git a/source/app/app_config.c b/source/app/app_config.c index 360b049..68516f6 100644 --- a/source/app/app_config.c +++ b/source/app/app_config.c @@ -1,6 +1,7 @@ #include "app_config.h" #include "../bsp/cs1232.h" #include "../bsp/chipid.h" +#include "../bsp/bsp_rfid.h" #include "../msp/eeprom.h" GlobalParam G; @@ -195,4 +196,15 @@ void L3_set_power_mode(U8 mode) // } // } R.power_mode = mode; + if(R.power_mode == POWER_LOW) + { + //除了功能按键,所有灯全灭 + L3_led_clear(); + //禁用rfid + bsp_rfid_en(RFID_DISABLE); + } + else + { + bsp_rfid_en(RFID_ENABLE); + } } \ No newline at end of file diff --git a/source/app/task_low_power.c b/source/app/task_low_power.c index 1203181..b0f149b 100644 --- a/source/app/task_low_power.c +++ b/source/app/task_low_power.c @@ -13,6 +13,7 @@ #include "task_low_power.h" #include "../app/app_config.h" #include "../bsp/bsp_config.h" +#include "../bsp/bsp_rfid.h" #include "../msp/uart0.h" S_TASK_LOW_POWER _s_task_low_power; @@ -35,6 +36,8 @@ void L3_task_low_power_handler(S_TASK_LOW_POWER *s) { //除了功能按键,所有灯全灭 L3_led_clear(); + //禁用RFID + bsp_rfid_en(RFID_DISABLE); } L2_task_go_Tdelay(D_task_LOW_POWER_SET,D_Tdelay_1s);