This commit is contained in:
2026-04-23 10:50:18 +08:00
commit a436fda935
844 changed files with 272643 additions and 0 deletions

33
IAPV1.1/Driver/led/led.c Normal file
View File

@ -0,0 +1,33 @@
#include "led.h"
#include "general_type.h"
void LED_Init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE);
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_10MHz;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1;
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_SetBits(GPIOA, GPIO_Pin_1);
}
void Run_Led(int i)
{
if(i)
{
LED1_RUN(1);
}
else
{
LED1_RUN(0);
}
}