You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

61 lines
1.5 KiB

#pragma once
#include "system_ES8P5066.h"
#include "lib_config.h"
#include <stdbool.h> //定义布尔
#define UART0_RXD0_PIN GPIO_Pin_A22
#define UART0_TXD0_PIN GPIO_Pin_A23
#define GPIO_GET(port, pin, mirror) \
(mirror(GPIO_ReadBit(GPIO_Pin_##port##pin) == 1))
#define GPIO_SET(port, pin, mirror, _state) \
GPIO_WriteBit(GPIO_Pin_##port##pin, mirror _state ? 1 : 0);
void gpio_init(void);
//声明
void port_debug_set(bool state);
void port_led0_set(bool state);
void port_led1_set(bool state);
void port_led2_set(bool state);
void port_led3_set(bool state);
void port_led_r_set(bool state);
void port_led_g_set(bool state);
void port_led_b_set(bool state);
void port_fan_set(bool state);
bool port_gpio_get_timer_key_state(void);
bool port_gpio_get_gears_key_state(void);
bool port_gpio_get_interval_key_state(void);
/*
引脚分配
主键H PA11
主键M PA16 高低档的选择和关闭(1开机高档红,2绿色,3蓝色,4关闭)
LED0 PA3
LED1 PB13
LED2 PA5
LED3 PA6
LED_R PA7
LED_G PA8
LED_B PA9
PWM PA4
风扇 PB1
时间的设置 |√
--------------------|------
档位的设置 | √
--------------------|------
对应led的亮灭 | √
--------------------|------
RGB灯 |
--------------------|------
设置PWM频率 |
--------------------|------
设置pwm占空比 |√
--------------------|------
倒计时 |√
--------------------|------
*/