Files
player/Project/Src/Drive/Include/lcd_pwm.h
andy 045cff4cc6 整理代码
1.解决一些编译警告
2.发现png因为文件api不支持而不能使用
2025-10-18 13:58:40 +08:00

25 lines
562 B
C

#ifndef _PWM_H
#define _PWM_H
#include "stdint.h"
/*---------------------- 配置 ------------------------*/
#define LCD_PWM_PORT GPIOD
#define LCD_PWM_CLK RCC_AHB1Periph_GPIOD
#define LCD_PWM_PIN GPIO_Pin_13
#define LCD_PWM_AF GPIO_AF_TIM4
#define LCD_PWM_PinSource GPIO_PinSource13
#define LCD_TIM_CLK RCC_APB1Periph_TIM4
#define LCD_TIM TIM4
/*-------------------- 函数声明 ----------------------*/
void LCD_PWMinit(uint8_t pulse); // PWM初始化
void LCD_PwmSetPulse(uint8_t pulse); // 设置占空比
// 获取屏幕亮度
uint8_t LCD_PwmGetPulse(void);
#endif