12345678910111213141516171819202122232425262728 |
- #ifndef LED_H
- #define LED_H
- #include "gd32f10x.h"
-
- /* exported types */
- typedef enum
- {
- LED1 = 0,
- } led_typedef_enum;
- /* eval board low layer led */
- #define LEDn 1U
- #define LED1_PIN GPIO_PIN_11
- #define LED1_GPIO_PORT GPIOB
- #define LED1_GPIO_CLK RCU_GPIOB
- /* configure led GPIO */
- void gd_eval_led_init(led_typedef_enum lednum);
- /* turn on selected led */
- void gd_eval_led_on(led_typedef_enum lednum);
- /* turn off selected led */
- void gd_eval_led_off(led_typedef_enum lednum);
- /* toggle the selected led */
- void gd_eval_led_toggle(led_typedef_enum lednum);
- #endif
|