hal_led/cfg/HAL_LED_cfg.h

46 lines
1.9 KiB
C

/******************************************************************************
* File: HAL_LED_cfg.h
* Component: HAL_LED
* Description: Configuration header for the LED abstraction layer.
* Defines LED strip instances, maximum strip length,
* and per-instance settings.
*
* Layer: HAL - configuration
*****************************************************************************/
#ifndef HAL_LED_CFG_H
#define HAL_LED_CFG_H
#include "STD_TYPES.h"
/* ------------------------------------------------------------------------ */
/* INSTANCE ENUMERATION */
/* ------------------------------------------------------------------------ */
typedef enum
{
HAL_LED_INSTANCE_ONBOARD = 0U, /**< Onboard WS2812B on RP2040-Zero */
HAL_LED_NUM_INSTANCES
} HAL_LED_tenuInstance;
/* ------------------------------------------------------------------------ */
/* BUFFER SIZING */
/* ------------------------------------------------------------------------ */
/** @brief Maximum number of LEDs any single instance can support.
* Determines the pixel buffer size in the control struct.
* Increase when adding longer strips. */
#define HAL_LED_MAX_LEDS_PER_INSTANCE 1U
/* ------------------------------------------------------------------------ */
/* INSTANCE 0 (ONBOARD) CONFIGURATION */
/* ------------------------------------------------------------------------ */
/** @brief Number of LEDs in the onboard strip (just 1 on the RP2040-Zero). */
#define HAL_LED_ONBOARD_NUM_LEDS 1U
/** @brief MCU_PIO instance index for the onboard LED.
* Maps to MCU_PIO_INSTANCE_WS2812 (defined in MCU_PIO_cfg.h). */
#define HAL_LED_ONBOARD_PIO_INSTANCE 0U
#endif /* HAL_LED_CFG_H */