CuVoodoo STM32F1 firmware template
|
library to communicate with a Titan Micro MAX7219 IC attached to a 4-digit 7-segment (code) More...
Go to the source code of this file.
Macros | |
#define | LED_MAX7219_LOAD_PORT B |
port for load line | |
#define | LED_MAX7219_LOAD_PIN 12 |
pin for load line | |
#define | LED_MAX7219_SPI 2 |
SPI to send data. | |
Functions | |
static void | led_max7219_write (uint16_t data, uint8_t display) |
write data on SPI bus and handle load signal More... | |
void | led_max7219_setup (uint8_t displays) |
setup communication with MAX7219 IC More... | |
void | led_max7219_on (uint8_t display) |
switch display on More... | |
void | led_max7219_off (uint8_t display) |
switch display off More... | |
void | led_max7219_test (bool test, uint8_t display) |
switch display in test or normal operation mode More... | |
void | led_max7219_intensity (uint8_t intensity, uint8_t digits, uint8_t display) |
set display intensity More... | |
bool | led_max7219_text (char *text, uint8_t display) |
display text More... | |
void | led_max7219_number (uint32_t number, uint8_t dots, uint8_t display) |
display number More... | |
Variables | |
static const uint8_t | ascii_7segments [] |
ASCII characters encoded for the 7 segments digit block. More... | |
uint8_t | lex_max7219_displays = 0 |
number of display in the chain | |
library to communicate with a Titan Micro MAX7219 IC attached to a 4-digit 7-segment (code)
bit vs segment: 0bpabcdefg +a+ f b +g+ e c p +d+
Definition in file led_max7219.c.
void led_max7219_intensity | ( | uint8_t | intensity, |
uint8_t | digits, | ||
uint8_t | display | ||
) |
set display intensity
[in] | intensity | level to set (0-15) |
[in] | digits | number of digits to display (1-8) |
[in] | display | display number in chain (0xff for all) |
Definition at line 228 of file led_max7219.c.
void led_max7219_number | ( | uint32_t | number, |
uint8_t | dots, | ||
uint8_t | display | ||
) |
display number
[in] | number | number to display (8 digits max) |
[in] | dots | set bit if dot on corresponding digit should be displayed |
[in] | display | display number in chain (0xff for all) |
Definition at line 254 of file led_max7219.c.
void led_max7219_off | ( | uint8_t | display | ) |
switch display off
[in] | display | display number in chain (0xff for all) |
Definition at line 214 of file led_max7219.c.
void led_max7219_on | ( | uint8_t | display | ) |
switch display on
[in] | display | display number in chain (0xff for all) |
Definition at line 209 of file led_max7219.c.
void led_max7219_setup | ( | uint8_t | displays | ) |
setup communication with MAX7219 IC
[in] | displays | number of displays in the chain |
Definition at line 186 of file led_max7219.c.
void led_max7219_test | ( | bool | test, |
uint8_t | display | ||
) |
switch display in test or normal operation mode
[in] | test | switch in test mode (else normal operation) |
[in] | display | display number in chain (0xff for all) |
Definition at line 219 of file led_max7219.c.
bool led_max7219_text | ( | char * | text, |
uint8_t | display | ||
) |
display text
[in] | text | text to display (8 characters) |
[in] | display | display number in chain (0xff for all) |
Definition at line 240 of file led_max7219.c.
|
static |
write data on SPI bus and handle load signal
[in] | data | bytes to write |
[in] | display | display number in chain (0xff for all) |
Definition at line 166 of file led_max7219.c.
|
static |
ASCII characters encoded for the 7 segments digit block.
Definition at line 61 of file led_max7219.c.