36 lines
910 B
C
36 lines
910 B
C
#ifndef __BSP_LED_H
|
|
#define __BSP_LED_H
|
|
|
|
#include "at32a423.h"
|
|
|
|
#define LED_NUM 3
|
|
|
|
#define LED2_PIN GPIO_PINS_7
|
|
#define LED2_GPIO GPIOB
|
|
#define LED2_GPIO_CRM_CLK CRM_GPIOB_PERIPH_CLOCK
|
|
|
|
#define LED3_PIN GPIO_PINS_7
|
|
#define LED3_GPIO GPIOB
|
|
#define LED3_GPIO_CRM_CLK CRM_GPIOB_PERIPH_CLOCK
|
|
|
|
#define LED4_PIN GPIO_PINS_7
|
|
#define LED4_GPIO GPIOB
|
|
#define LED4_GPIO_CRM_CLK CRM_GPIOB_PERIPH_CLOCK
|
|
|
|
|
|
typedef enum
|
|
{
|
|
LED2 = 0,
|
|
LED3 = 1,
|
|
LED4 = 2
|
|
} led_type;
|
|
|
|
|
|
void bsp_led_init(led_type led);
|
|
void bsp_led_on(led_type led);
|
|
void bsp_led_off(led_type led);
|
|
void bsp_led_toggle(led_type led);
|
|
|
|
#endif
|
|
|