From f03cf3ae7a36954e64fc014e6bb7afd20c5a5247 Mon Sep 17 00:00:00 2001
From: jinlicong <493886250@qq.com>
Date: Wed, 12 Jun 2024 17:22:08 +0800
Subject: [PATCH] 增加IAP功能,准备测试上位机升级
---
Function/OTHER_FUN/other_fun.c | 38 +++++++++++++++++++++++++++++++++++++-
1 files changed, 37 insertions(+), 1 deletions(-)
diff --git a/Function/OTHER_FUN/other_fun.c b/Function/OTHER_FUN/other_fun.c
index 418362f..53872b6 100644
--- a/Function/OTHER_FUN/other_fun.c
+++ b/Function/OTHER_FUN/other_fun.c
@@ -1,6 +1,27 @@
#include "other_fun.h"
#include "gpio.h"
#include "linked_list.h"
+#include "main.h"
+#include "sizhu_alarm_record.h"
+
+
+
+
+
+void led_init(void)
+{
+ CMU_PERCLK_SetableEx(PADCLK, ENABLE); //PADʱ�ӣ�GPIO��ʹ�ܺ���
+
+ OutputIO(GPIOD,GPIO_Pin_8,OUT_PUSHPULL);
+}
+
+void led_Close(void)
+{
+ CloseIO(GPIOD,GPIO_Pin_8);
+}
+
+
+
void UNCAP_GPIO_Clk_Init(void)
{
@@ -67,9 +88,24 @@
//ϵͳ������ɢС���ܴ���
void OtherFunPro(void)
{
+ #ifdef LED_TEST
+// led_init();
+// LED_TOG;
+
+ if((sys_clockBCD_g.sec &0x04) == 0){
+ led_init();
+ LED_ON;
+ }else{
+ led_init();
+ LED_OFF;
+ }
+ #else
+ led_Close();
+ #endif
+
UncapCheck(); //���Ǽ��
MagneticInterferenceCheck(); //�Ÿ��ż��
-}
\ No newline at end of file
+}
--
Gitblit v1.9.3