feat: 模块化开发c语言led
This commit is contained in:
16
Core/driver/led/led.c
Normal file
16
Core/driver/led/led.c
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// Created by Wind on 2025/11/2.
|
||||
//
|
||||
|
||||
#include "led.h"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
|
||||
void led_on(void) {
|
||||
HAL_GPIO_WritePin(LED_GPIO_Port,LED_Pin,GPIO_PIN_SET);
|
||||
}
|
||||
|
||||
void led_off(void) {
|
||||
HAL_GPIO_WritePin(LED_GPIO_Port,LED_Pin,GPIO_PIN_RESET);
|
||||
}
|
||||
Reference in New Issue
Block a user