HiFi player project, first commit.
This commit is contained in:
commit
4126ea13a1
49 files changed
+6333
No files matched your search
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
****************************************************************************************************
|
||||
* @file led.c
|
||||
* @author 正点原子团队(ALIENTEK)
|
||||
* @version V1.0
|
||||
* @date 2025-01-01
|
||||
* @brief LED驱动代码
|
||||
* @license Copyright (c) 2020-2032, 广州市星翼电子科技有限公司
|
||||
****************************************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* 实验平台:正点原子 ESP32-S3 开发板
|
||||
* 在线视频:www.yuanzige.com
|
||||
* 技术论坛:www.openedv.com
|
||||
* 公司网址:www.alientek.com
|
||||
* 购买地址:openedv.taobao.com
|
||||
*
|
||||
****************************************************************************************************
|
||||
*/
|
||||
|
||||
#include "led.h"
|
||||
|
||||
|
||||
/**
|
||||
* @brief 初始化LED
|
||||
* @param 无
|
||||
* @retval 无
|
||||
*/
|
||||
void led_init(void)
|
||||
{
|
||||
gpio_config_t gpio_init_struct = {0};
|
||||
|
||||
gpio_init_struct.intr_type = GPIO_INTR_DISABLE; /* 失能引脚中断 */
|
||||
gpio_init_struct.mode = GPIO_MODE_INPUT_OUTPUT; /* 输入输出模式 */
|
||||
gpio_init_struct.pull_up_en = GPIO_PULLUP_DISABLE; /* 失能上拉 */
|
||||
gpio_init_struct.pull_down_en = GPIO_PULLDOWN_DISABLE; /* 失能下拉 */
|
||||
gpio_init_struct.pin_bit_mask = 1ull << LED0_GPIO_PIN; /* 设置的引脚的位掩码 */
|
||||
ESP_ERROR_CHECK(gpio_config(&gpio_init_struct)); /* 配置GPIO */
|
||||
|
||||
LED0(1); /* 关闭LED0 */
|
||||
}
|
||||
Reference in new issue
Block a user