31 lines
602 B
C
31 lines
602 B
C
/**
|
|
* @file bsp_led.h
|
|
* @brief LED1(PB0) / LED2(PA6) driver
|
|
*/
|
|
#ifndef __BSP_LED_H__
|
|
#define __BSP_LED_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "n32wb03x.h"
|
|
|
|
/* NOTE: PA4/PA5 are SWD (SWCLK/SWDIO) debug pins - never used here. */
|
|
#define LED1_PORT GPIOB
|
|
#define LED1_PIN GPIO_PIN_0
|
|
|
|
#define LED2_PORT GPIOA
|
|
#define LED2_PIN GPIO_PIN_6
|
|
|
|
void bsp_led_init(void);
|
|
void bsp_led_on(GPIO_Module* GPIOx, uint16_t pin);
|
|
void bsp_led_off(GPIO_Module* GPIOx, uint16_t pin);
|
|
void bsp_led_toggle(GPIO_Module* GPIOx, uint16_t pin);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __BSP_LED_H__ */
|