/****************************************************************************
* File Name : key_led.c.c
* Author : MCD Application Team
* FW Version : V2.0.1
* Date : 06/11/2012
* Description : This file provides all the RCC firmware functions.
*开发板 :神舟三号
* 现象 :如程序执行前按住按键USER2 LED亮起,没按则灯不亮
*****************************************************************************
*/
#include "stm32f10x_lib.h"
///////////// define LED ///////////////
#define RCC_GPIO_LED RCC_APB2Periph_GPIOF
#define GPIO_LED GPIOF
#define GPIO_LED_PIN GPIO_Pin_6
///////////// define KEY&nb

该程序用于神舟三号开发板,通过STM32实现按键(KEY)检测,当按下USER2键时LED亮起,否则保持关闭状态。程序中包含了GPIO配置、中断设置和时钟管理等关键步骤。
最低0.47元/天 解锁文章
1189

被折叠的 条评论
为什么被折叠?



