RMUL2025/User/bsp/led.h
2025-03-09 18:01:50 +08:00

49 lines
1.0 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ----------------------------------------------------------------- */
#include <stdint.h>
#include "bsp/bsp.h"
/* Exported constants ------------------------------------------------------- */
/* Exported macro ----------------------------------------------------------- */
/* Exported types ----------------------------------------------------------- */
/* LED灯状态设置用 */
typedef enum {
BSP_LED_ON,
BSP_LED_OFF,
BSP_LED_TAGGLE,
} BSP_LED_Status_t;
/* LED通道 */
typedef enum {
#ifdef DEV_BOARD_A
BSP_LED1,
BSP_LED2,
BSP_LED3,
BSP_LED4,
BSP_LED5,
BSP_LED6,
BSP_LED7,
BSP_LED8,
#elif defined DEV_BOARD_C
BSP_LED_BLU,
#endif
BSP_LED_RED,
BSP_LED_GRN,
} BSP_LED_Channel_t;
/* Exported functions prototypes -------------------------------------------- */
/* 用于A板时会无视duty_cycle的值。使用B板时duty_cycle才有效*/
int8_t BSP_LED_Set(BSP_LED_Channel_t ch, BSP_LED_Status_t s, float duty_cycle);
#ifdef __cplusplus
}
#endif