34 lines
499 B
C
34 lines
499 B
C
/*
|
|
* led.c
|
|
*
|
|
* Created on: 2025Äê5ÔÂ15ÈÕ
|
|
* Author: cc
|
|
*/
|
|
|
|
#include "led.h"
|
|
#include "debug.h"
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
__attribute__((section(".non_0_wait"))) void SYS_LED_Init(void)
|
|
{
|
|
GPIOA_ModeCfg(GPIO_Pin_12,GPIO_ModeOut_PP); //LED
|
|
|
|
SYS_LED_ON;
|
|
}
|
|
|
|
__attribute__((section(".non_0_wait"))) void SYS_LED_Task(void)
|
|
{
|
|
static uint32_t led_tick = 0;
|
|
|
|
if(SysTick_1ms - led_tick >= 1000 ){
|
|
led_tick = SysTick_1ms;
|
|
|
|
SYS_LED_FLIP;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|