mini.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef MINI_H
20 #define MINI_H
21 
22 #include <stdint.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 #define MINI_MATRIX_ROWS (5U)
32 
36 #define MINI_MATRIX_COLS (5U)
37 
41 void mini_matrix_init(void);
42 
49 void mini_matrix_on(uint8_t row, uint8_t col);
50 
57 void mini_matrix_off(uint8_t row, uint8_t col);
58 
68 void mini_matrix_set_raw(const uint8_t *buf);
69 
75 void mini_matrix_set_char(char c);
76 
83 void mini_matrix_shift_str(const char *str, uint32_t delay);
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif /* MINI_H */
90 
void mini_matrix_on(uint8_t row, uint8_t col)
Turn on a single LED in the LED matrix.
void mini_matrix_init(void)
Initialize the Calliope mini's LED matrix.
void mini_matrix_shift_str(const char *str, uint32_t delay)
Shift the given string through the LED matrix.
void mini_matrix_set_raw(const uint8_t *buf)
Write the given 'image' to the LED matrix.
void delay(unsigned long msec)
Sleep for a given amount of time [milliseconds].
void mini_matrix_set_char(char c)
Write the given character to the matrix, using the Mineplex font.
void mini_matrix_off(uint8_t row, uint8_t col)
Turn off a single LED in the LED matrix.