WPILibC++ 2027.0.0-alpha-2
Loading...
Searching...
No Matches
Addressable LED Functions

Functions

HAL_AddressableLEDHandle HAL_InitializeAddressableLED (int32_t channel, const char *allocationLocation, int32_t *status)
 Creates a new instance of an addressable LED.
 
void HAL_FreeAddressableLED (HAL_AddressableLEDHandle handle)
 Free the Addressable LED Handle.
 
void HAL_SetAddressableLEDStart (HAL_AddressableLEDHandle handle, int32_t start, int32_t *status)
 Sets the start buffer location used for the LED strip.
 
void HAL_SetAddressableLEDLength (HAL_AddressableLEDHandle handle, int32_t length, int32_t *status)
 Sets the length of the LED strip.
 
void HAL_SetAddressableLEDData (int32_t start, int32_t length, HAL_AddressableLEDColorOrder colorOrder, const struct HAL_AddressableLEDData *data, int32_t *status)
 Sets the led output data.
 

Detailed Description

Function Documentation

◆ HAL_FreeAddressableLED()

void HAL_FreeAddressableLED ( HAL_AddressableLEDHandle handle)

Free the Addressable LED Handle.

Parameters
[in]handlethe Addressable LED handle to free

◆ HAL_InitializeAddressableLED()

HAL_AddressableLEDHandle HAL_InitializeAddressableLED ( int32_t channel,
const char * allocationLocation,
int32_t * status )

Creates a new instance of an addressable LED.

Parameters
[in]channelthe smartio channel
[in]allocationLocationthe location where the allocation is occurring (can be null)
[out]statusthe error code, or 0 for success
Returns
Addressable LED handle

◆ HAL_SetAddressableLEDData()

void HAL_SetAddressableLEDData ( int32_t start,
int32_t length,
HAL_AddressableLEDColorOrder colorOrder,
const struct HAL_AddressableLEDData * data,
int32_t * status )

Sets the led output data.

All addressable LEDs use a single backing buffer 1024 LEDs in size. This function may be used to set part of or all of the buffer.

Parameters
[in]startthe strip start, in LEDs
[in]lengththe strip length, in LEDs
[in]colorOrderthe color order
[in]datathe buffer to write
[out]statusthe error code, or 0 for success

◆ HAL_SetAddressableLEDLength()

void HAL_SetAddressableLEDLength ( HAL_AddressableLEDHandle handle,
int32_t length,
int32_t * status )

Sets the length of the LED strip.

All addressable LEDs use a single backing buffer 1024 LEDs in size. The max length for a single output is 1024 LEDs (with an offset of zero).

Parameters
[in]handlethe Addressable LED handle
[in]lengththe strip length, in LEDs
[out]statusthe error code, or 0 for success

◆ HAL_SetAddressableLEDStart()

void HAL_SetAddressableLEDStart ( HAL_AddressableLEDHandle handle,
int32_t start,
int32_t * status )

Sets the start buffer location used for the LED strip.

All addressable LEDs use a single backing buffer 1024 LEDs in size. The max length for a single output is 1024 LEDs (with an offset of zero).

Parameters
[in]handlethe Addressable LED handle
[in]startthe strip start, in LEDs
[out]statusthe error code, or 0 for success