WPILibC++ 2025.3.2
Loading...
Searching...
No Matches
AddressableLEDTypes.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <hal/Types.h>
8#include <stdint.h>
9
10/** max length of LED strip supported by FPGA. */
11#define HAL_kAddressableLEDMaxLength 5460
12
13/** structure for holding one LED's color data. */
15 uint8_t b; ///< blue value
16 uint8_t g; ///< green value
17 uint8_t r; ///< red value
18 uint8_t padding;
19};
20
21/**
22 * Order that color data is sent over the wire.
23 */
32
33#ifdef __cplusplus
35 return static_cast<int32_t>(order);
36}
37#endif
constexpr auto format_as(HAL_AddressableLEDColorOrder order)
Definition AddressableLEDTypes.h:34
HAL_AddressableLEDColorOrder
Order that color data is sent over the wire.
Definition AddressableLEDTypes.h:24
@ HAL_ALED_BGR
Definition AddressableLEDTypes.h:27
@ HAL_ALED_RBG
Definition AddressableLEDTypes.h:26
@ HAL_ALED_BRG
Definition AddressableLEDTypes.h:28
@ HAL_ALED_GRB
Definition AddressableLEDTypes.h:30
@ HAL_ALED_GBR
Definition AddressableLEDTypes.h:29
@ HAL_ALED_RGB
Definition AddressableLEDTypes.h:25
#define HAL_ENUM(name)
Definition Types.h:76
structure for holding one LED's color data.
Definition AddressableLEDTypes.h:14
uint8_t r
red value
Definition AddressableLEDTypes.h:17
uint8_t padding
Definition AddressableLEDTypes.h:18
uint8_t g
green value
Definition AddressableLEDTypes.h:16
uint8_t b
blue value
Definition AddressableLEDTypes.h:15