![]() |
NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
|
Smart LED Interface (NEOLED) HW driver source file. More...
#include <neorv32.h>
Functions | |
int | neorv32_neoled_available (void) |
void | neorv32_neoled_enable (void) |
void | neorv32_neoled_disable (void) |
void | neorv32_neoled_setup (uint32_t prsc, uint32_t t_total, uint32_t t_high_zero, uint32_t t_high_one) |
void | neorv32_neoled_setup_ws2812 (void) |
void | neorv32_neoled_strobe_blocking (void) |
void | neorv32_neoled_strobe_nonblocking (void) |
void | neorv32_neoled_write32_blocking (uint32_t data) |
void | neorv32_neoled_write32_nonblocking (uint32_t data) |
void | neorv32_neoled_write24_blocking (uint32_t data) |
void | neorv32_neoled_write24_nonblocking (uint32_t data) |
int | neorv32_neoled_get_fifo_depth (void) |
int | neorv32_neoled_fifo_full (void) |
int | neorv32_neoled_fifo_empty (void) |
int | neorv32_neoled_busy (void) |
Smart LED Interface (NEOLED) HW driver source file.
int neorv32_neoled_available | ( | void | ) |
Check if NEOLED unit was synthesized.
int neorv32_neoled_busy | ( | void | ) |
Check if NEOLED is busy (sending stuff).
void neorv32_neoled_disable | ( | void | ) |
Disable NEOLED controller.
void neorv32_neoled_enable | ( | void | ) |
Enable NEOLED controller.
int neorv32_neoled_fifo_empty | ( | void | ) |
Check if TX FIFO is empty.
int neorv32_neoled_fifo_full | ( | void | ) |
Check if TX FIFO is full.
int neorv32_neoled_get_fifo_depth | ( | void | ) |
Get NEOLED hardware buffer size.
void neorv32_neoled_setup | ( | uint32_t | prsc, |
uint32_t | t_total, | ||
uint32_t | t_high_zero, | ||
uint32_t | t_high_one ) |
Enable and configure NEOLED controller. The NEOLED control register bits are listed in NEORV32_NEOLED_CTRL_enum. This function performs a "raw" configuration (just configuring the according control register bit).
[in] | prsc | Clock prescaler select (0..7). See NEORV32_CLOCK_PRSC_enum. |
[in] | t_total | Number of pre-scaled clock ticks for total bit period (0..31). |
[in] | t_high_zero | Number of pre-scaled clock ticks to generate high-time for sending a '0' (0..31). |
[in] | t_high_one | Number of pre-scaled clock ticks to generate high-time for sending a '1' (0..31). |
void neorv32_neoled_setup_ws2812 | ( | void | ) |
Configure NEOLED controller for using WS2812 LEDs (NeoPixel-compatible). This function computes all the required timings and finally calls neorv32_neoled_setup.
void neorv32_neoled_strobe_blocking | ( | void | ) |
Send strobe command ("RESET") - blocking.
void neorv32_neoled_strobe_nonblocking | ( | void | ) |
Send strobe command ("RESET") - non-blocking.
void neorv32_neoled_write24_blocking | ( | uint32_t | data | ) |
Send single RGB data word to NEOLED module (blocking).
[in] | LSB-aligned | 24-bit RGBW data |
void neorv32_neoled_write24_nonblocking | ( | uint32_t | data | ) |
Send single RGB data word to NEOLED module (non-blocking).
[in] | LSB-aligned | 24-bit RGBW data |
void neorv32_neoled_write32_blocking | ( | uint32_t | data | ) |
Send single RGBW data word to NEOLED module (blocking).
[in] | 32-bit | RGBW data |
void neorv32_neoled_write32_nonblocking | ( | uint32_t | data | ) |
Send single RGBW data word to NEOLED module (non-blocking).
[in] | 32-bit | RGBW data |