Classes | Macros | Typedefs | Functions | Variables
ws2811.cpp File Reference
#include "ws2811.h"
#include <ros/console.h>
#include <memory.h>
#include <string.h>
Include dependency graph for ws2811.cpp:

Go to the source code of this file.

Classes

struct  ws2811_device
 

Macros

#define WS2811_RETURN_STR(state, name, str)   str
 

Typedefs

typedef struct ws2811_device ws2811_device_t
 

Functions

void ws2811_fini (ws2811_t *ws2811)
 
const char * ws2811_get_return_t_str (const ws2811_return_t state)
 
ws2811_return_t ws2811_init (ws2811_t *ws2811)
 
ws2811_return_t ws2811_render (ws2811_t *ws2811)
 
ws2811_return_t ws2811_wait (ws2811_t *ws2811)
 

Variables

const char * ws2811_return_state_strings []
 

Macro Definition Documentation

◆ WS2811_RETURN_STR

#define WS2811_RETURN_STR (   state,
  name,
  str 
)    str

Typedef Documentation

◆ ws2811_device_t

Function Documentation

◆ ws2811_fini()

void ws2811_fini ( ws2811_t ws2811)

Shut down DMA, PWM, and cleanup memory.

Parameters
ws2811ws2811 instance pointer.
Returns
None

Definition at line 61 of file ws2811.cpp.

◆ ws2811_get_return_t_str()

const char* ws2811_get_return_t_str ( const ws2811_return_t  state)

Definition at line 109 of file ws2811.cpp.

◆ ws2811_init()

ws2811_return_t ws2811_init ( ws2811_t ws2811)

Allocate and initialize memory, buffers, pages, PWM, DMA, and GPIO.

Parameters
ws2811ws2811 instance pointer.
Returns
0 on success, -1 otherwise.

Definition at line 23 of file ws2811.cpp.

◆ ws2811_render()

ws2811_return_t ws2811_render ( ws2811_t ws2811)

Render the DMA buffer from the user supplied LED arrays and start the DMA controller. This will update all LEDs on both PWM channels.

Parameters
ws2811ws2811 instance pointer.
Returns
None

Definition at line 75 of file ws2811.cpp.

◆ ws2811_wait()

ws2811_return_t ws2811_wait ( ws2811_t ws2811)

Wait for any executing DMA operation to complete before returning.

Parameters
ws2811ws2811 instance pointer.
Returns
0 on success, -1 on DMA competion error

Definition at line 98 of file ws2811.cpp.

Variable Documentation

◆ ws2811_return_state_strings

const char* ws2811_return_state_strings[]
Initial value:
= {
#define WS2811_RETURN_STR(state, name, str)
}

Definition at line 104 of file ws2811.cpp.



ws281x
Author(s): Alexey Rogachevskiy , Oleg Kalachev
autogenerated on Wed Jun 15 2022 02:46:00