All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mini.h File Reference

Calliope mini specific LED handling. More...

Detailed Description

Calliope mini specific LED handling.

Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file mini.h.

#include <stdint.h>
+ Include dependency graph for mini.h:

Go to the source code of this file.

#define MINI_MATRIX_ROWS   (5U)
 Number of rows of the LED matrix.
 
#define MINI_MATRIX_COLS   (5U)
 Number of columns of the LED matrix.
 
void mini_matrix_init (void)
 Initialize the Calliope mini's LED matrix.
 
void mini_matrix_on (uint8_t row, uint8_t col)
 Turn on a single LED in the LED matrix. More...
 
void mini_matrix_off (uint8_t row, uint8_t col)
 Turn off a single LED in the LED matrix. More...
 
void mini_matrix_set_raw (const uint8_t *buf)
 Write the given 'image' to the LED matrix. More...
 
void mini_matrix_set_char (char c)
 Write the given character to the matrix, using the Mineplex font. More...
 
void mini_matrix_shift_str (const char *str, uint32_t delay)
 Shift the given string through the LED matrix. More...
 

Function Documentation

◆ mini_matrix_off()

void mini_matrix_off ( uint8_t  row,
uint8_t  col 
)

Turn off a single LED in the LED matrix.

Parameters
[in]rowrow of the LED
[in]colcolumn of the LED

◆ mini_matrix_on()

void mini_matrix_on ( uint8_t  row,
uint8_t  col 
)

Turn on a single LED in the LED matrix.

Parameters
[in]rowrow of the LED
[in]colcolumn of the LED

◆ mini_matrix_set_char()

void mini_matrix_set_char ( char  c)

Write the given character to the matrix, using the Mineplex font.

Parameters
[in]ccharacter to display

◆ mini_matrix_set_raw()

void mini_matrix_set_raw ( const uint8_t *  buf)

Write the given 'image' to the LED matrix.

In the given buffer, each byte represents one LED in the matrix, hence the buffer MUST be at least 25 byte wide. A byte value of 0 turns an LED off, while any other value turns it on.

Parameters
[in]bufnew data to display, MUST be at least 25 byte

◆ mini_matrix_shift_str()

void mini_matrix_shift_str ( const char *  str,
uint32_t  delay 
)

Shift the given string through the LED matrix.

Parameters
[in]strstring do display
[in]delaydelay between each step [in us]