31#include <freertos/FreeRTOS.h>
32#include <freertos/task.h>
68static const uint8_t led_matrix_rows = CONFIG_LED_MATRIX_ROWS;
73static const uint8_t led_matrix_columns = CONFIG_LED_MATRIX_COLUMNS;
84static const uint8_t led_matrix_map[CONFIG_LED_MATRIX_ROWS * CONFIG_LED_MATRIX_COLUMNS] = {
86 10, 11, 12, 13, 14, 15,
88 30, 31, 16, 17, 18, 19,
89 24, 25, 26, 27, 28, 29
bool led_matrix_data_arr_t[CONFIG_LED_MATRIX_ROWS][CONFIG_LED_MATRIX_COLUMNS]
An array of booleans used to represent the LED matrix data instead of the uint32_t.
Definition: led_matrix.h:47
uint32_t led_matrix_data_t
An integer used as a bitarray to represent the LED matrix data type.
Definition: led_matrix.h:40
led_matrix led_matrix_init(void)
Enables and configures the LED Matrix and corresponding shift registers.
Definition: led_matrix.c:31
esp_err_t led_matrix_set_data_raw(led_matrix *matrix, const led_matrix_data_t data)
Sets all the bits of the "data" field.
Definition: led_matrix.c:102
esp_err_t led_matrix_display_string(led_matrix *matrix, const char *message, double wait_ms)
Displays the entered string character by character on the LED Matrix with a delay of "wait_ms" ms bet...
Definition: led_matrix.c:134
esp_err_t led_matrix_set_bit(led_matrix *matrix, const uint8_t led_number, const uint8_t led_value)
Sets a single bit of the "data" field of the passed in matrix.
Definition: led_matrix.c:56
led_matrix_output_mode_t
Enum used for the output mode of the LED matrix.
Definition: led_matrix.h:60
@ LED_MATRIX_OUTPUT_SEQ
Definition: led_matrix.h:61
@ LED_MATRIX_OUTPUT_PAR
Definition: led_matrix.h:62
esp_err_t led_matrix_set_data(led_matrix *matrix, const led_matrix_data_t data)
Sets all the bits of the "data" field of the passed in matrix using led_matrix_set_bit().
Definition: led_matrix.c:85
esp_err_t led_matrix_write(const led_matrix *matrix, const led_matrix_output_mode_t mode)
Performs the write from the led_matrix structure to the actual LEDs on board.
Definition: led_matrix.c:115
led_matrix_data_t bool_to_uint32(const led_matrix_data_arr_t input_arr)
Converts a boolean array of size CONFIG_LED_MATRIX_ROWSxCONFIG_LED_MATRIX_COLUMNS to a 32-bit unsigne...
Definition: led_matrix.c:41
esp_err_t led_matrix_cleanup(led_matrix matrix)
Performs cleanup on the LED Matrix contents.
Definition: led_matrix.c:167
Struct used as a handle for LED matrix.
Definition: led_matrix.h:52
led_matrix_data_t data
Definition: led_matrix.h:53
shift_register_t config
Definition: led_matrix.h:54
The handle used for representing the shift register.
Definition: shift_register.h:45