From 4979f7565cbd5f093e280f9f277ae29bb450acb8 Mon Sep 17 00:00:00 2001 From: zhyinch <zhyinch@gmail.com> Date: 星期六, 15 九月 2018 17:28:24 +0800 Subject: [PATCH] 增加低功耗标签 --- 源码/核心板/Src/OnChipDevices/Rcc_Nvic_Systick.c | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Rcc_Nvic_Systick.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Rcc_Nvic_Systick.c" index e021ee3..14e9205 100644 --- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Rcc_Nvic_Systick.c" +++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Rcc_Nvic_Systick.c" @@ -44,7 +44,7 @@ void Nvic_Init(void) { NVIC_InitTypeDef NVIC_InitStructure; - + EXTI_InitTypeDef EXTI_InitStructure; NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); /* Enable and set EXTI Interrupt to the lowest priority */ @@ -53,6 +53,17 @@ NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; + EXTI_InitStructure.EXTI_Line = EXTI_Line17; + EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; + EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising; + EXTI_InitStructure.EXTI_LineCmd = ENABLE; + EXTI_Init(&EXTI_InitStructure); + + NVIC_InitStructure.NVIC_IRQChannel = RTCAlarm_IRQn; + NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; + NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; + NVIC_InitStructure.NVIC_IRQChannelCmd =ENABLE; + NVIC_Init(&NVIC_InitStructure); } @@ -89,4 +100,4 @@ { uint32_t i=1000*nTimer; delay_us(i); -} +} \ No newline at end of file -- Gitblit v1.9.3