初始版本

This commit is contained in:
2026-04-23 13:49:53 +08:00
parent c1d6ebd38c
commit ac718a463a
257 changed files with 265681 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
#include "hdl_led.h"
#define LED_PORT (GPIO_PORT_H)
#define LED_PIN (GPIO_PIN_02)
void hdl_led_init(void){
LL_PERIPH_WE(LL_PERIPH_GPIO);
stc_gpio_init_t stcGpioInit={0};
//GPIO_StructInit(&stcGpioInit);
stcGpioInit.u16PinDir = PIN_DIR_OUT;
stcGpioInit.u16PinState = PIN_STAT_SET;
stcGpioInit.u16PinDrv = PIN_HIGH_DRV;
(void)GPIO_Init( LED_PORT ,LED_PIN, &stcGpioInit);
LL_PERIPH_WP(LL_PERIPH_GPIO);
}
void hdl_led_on(hdl_led_id_t id){
GPIO_SetPins(LED_PORT ,LED_PIN );
}
void hdl_led_off(hdl_led_id_t id){
GPIO_ResetPins(LED_PORT ,LED_PIN);
}
void hdl_led_toggle(hdl_led_id_t id){
GPIO_ResetPins(LED_PORT ,LED_PIN);
}