update
This commit is contained in:
31
leakage_system/usr/bsp/bsp_Led.c
Normal file
31
leakage_system/usr/bsp/bsp_Led.c
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "bsp_Led.h"
|
||||
#include "app_timer.h"
|
||||
|
||||
#define LED_ON HAL_GPIO_WritePin (LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET)
|
||||
#define LED_OFF HAL_GPIO_WritePin (LED_GPIO_Port, LED_Pin, GPIO_PIN_SET)
|
||||
#define LED_TOGGLE HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin)
|
||||
|
||||
|
||||
|
||||
static void bsp_led_init(void);
|
||||
static void bsp_led_task(void);
|
||||
|
||||
bsp_led_t led =
|
||||
{
|
||||
.init = bsp_led_init,
|
||||
.task = bsp_led_task,
|
||||
};
|
||||
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˸<EFBFBD><CBB8><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
static void bsp_led_init(void)
|
||||
{
|
||||
for(u8 i = 0;i < 20;i++)
|
||||
{
|
||||
delay_ms(50);
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
}
|
||||
}
|
||||
|
||||
static void bsp_led_task(void)
|
||||
{
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
}
|
||||
Reference in New Issue
Block a user