// 设备状态驱动，包括指示灯和其他外设
// 杭州秒寻科技有限公司
// 周涛
// 2023-11-21

#ifndef DERIVERLED_H
#define DERIVERLED_H

#include "stm32f4xx.h"
#include "stm32f4xx_rcc.h"

// 红
#define DRIVER_LED_RED_CLK RCC_AHB1Periph_GPIOC
#define DRIVER_LED_RED_PIN GPIO_Pin_4
#define DRIVER_LED_RED_PORT GPIOC

// 绿
#define DRIVER_LED_GREEN_CLK RCC_AHB1Periph_GPIOA
#define DRIVER_LED_GREEN_PIN GPIO_Pin_6
#define DRIVER_LED_GREEN_PORT GPIOA

// 蓝
#define DRIVER_LED_BLUE_CLK RCC_AHB1Periph_GPIOA
#define DRIVER_LED_BLUE_PIN GPIO_Pin_3
#define DRIVER_LED_BLUE_PORT GPIOA

// 供外部使用接口
void driver_led_gpio_init();
void driver_led_switch_red(uint8 bySwitch);
void driver_led_switch_green(uint8 bySwitch);
void driver_led_switch_blue(uint8 bySwitch);

#endif
