apa102c base driver modules
More...
apa102c base driver modules
◆ APA102C_COLOR
| #define APA102C_COLOR |
( |
| RED, |
|
|
| GREEN, |
|
|
| BLUE, |
|
|
| BRIGHTNESS ) |
Value: ((uint32_t)(0xE | ((BRIGHTNESS) & 0x1F)) << 24) | \
((uint32_t)((BLUE) & 0xFF) << 16) | \
((uint32_t)((GREEN) & 0xFF) << 8) | \
((uint32_t)((RED) & 0xFF) << 0)
make color
- Parameters
-
| [in] | RED | red color |
| [in] | GREEN | green color |
| [in] | BLUE | blue color |
| [in] | BRIGHTNESS | brightness |
- Note
- 0<= RED <= 255 0<= GREEN <= 255 0<= BLUE <= 255 0<= BRIGHTNESS <= 31
Definition at line 169 of file driver_apa102c.h.
◆ apa102c_handle_t
apa102c handle structure definition
◆ apa102c_info_t
apa102c information structure definition
◆ apa102c_deinit()
close the chip
- Parameters
-
| [in] | *handle | pointer to an apa102c handle structure |
- Returns
- status code
- 0 success
- 1 spi deinit failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 261 of file driver_apa102c.c.
◆ apa102c_info()
get chip's information
- Parameters
-
| [out] | *info | pointer to an apa102c info structure |
- Returns
- status code
- 0 success
- 2 handle is NULL
- Note
- none
Definition at line 320 of file driver_apa102c.c.
◆ apa102c_init()
initialize the chip
- Parameters
-
| [in] | *handle | pointer to an apa102c handle structure |
- Returns
- status code
- 0 success
- 1 spi initialization failed
- 2 handle is NULL
- 3 linked functions is NULL
- Note
- none
Definition at line 61 of file driver_apa102c.c.
◆ apa102c_write()
| uint8_t apa102c_write |
( |
apa102c_handle_t * | handle, |
|
|
uint32_t * | color, |
|
|
uint32_t | len, |
|
|
uint8_t * | temp, |
|
|
uint32_t | temp_len ) |
write color frame
- Parameters
-
| [in] | *handle | pointer to an apa102c handle structure |
| [in] | *color | pointer to a color buffer |
| [in] | len | color length |
| [in] | *temp | pointer to a temp buffer |
| [in] | temp_len | temp buffer length |
- Returns
- status code
- 0 success
- 1 write failed
- 2 handle is NULL
- 3 handle is not initialized
- 4 color is null
- 5 temp is null
- 6 temp buffer is too small
- Note
- none
Definition at line 124 of file driver_apa102c.c.
◆ apa102c_write_off()
| uint8_t apa102c_write_off |
( |
apa102c_handle_t * | handle, |
|
|
uint32_t | len, |
|
|
uint8_t * | temp, |
|
|
uint32_t | temp_len ) |
write off frame
- Parameters
-
| [in] | *handle | pointer to an apa102c handle structure |
| [in] | len | color length |
| [in] | *temp | pointer to a temp buffer |
| [in] | temp_len | temp buffer length |
- Returns
- status code
- 0 success
- 1 write failed
- 2 handle is NULL
- 3 handle is not initialized
- 4 temp is null
- 5 temp buffer is too small
- Note
- none
Definition at line 198 of file driver_apa102c.c.