CuVoodoo STM32F1 firmware template
Functions
led_max7219.h File Reference

library to communicate with a Maxim MAX7219 IC attached to a 8-digit 7-segment (API) More...

Go to the source code of this file.

Functions

void led_max7219_setup (uint8_t displays)
 setup communication with MAX7219 IC More...
 
void led_max7219_nop (uint8_t display)
 do nothing (no operation) 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...
 

Detailed Description

library to communicate with a Maxim MAX7219 IC attached to a 8-digit 7-segment (API)

Author
King Kévin kingk.nosp@m.evin.nosp@m.@cuvo.nosp@m.odoo.nosp@m..info
Date
2017
Note
peripherals used: GPIO GPIO used to control MAX7219 IC load line, SPI SPI used to communication with MAX7219 IC
Warning
all calls are blocking

Definition in file led_max7219.h.

Function Documentation

◆ led_max7219_intensity()

void led_max7219_intensity ( uint8_t  intensity,
uint8_t  digits,
uint8_t  display 
)

set display intensity

Parameters
[in]intensitylevel to set (0-15)
[in]digitsnumber of digits to display (1-8)
[in]displaydisplay number in chain (0xff for all)

Definition at line 228 of file led_max7219.c.

◆ led_max7219_nop()

void led_max7219_nop ( uint8_t  display)

do nothing (no operation)

Parameters
[in]displaydisplay number in chain (0xff for all)
Note
send it to the last display in the chain to clear the previous command from the chain

◆ led_max7219_number()

void led_max7219_number ( uint32_t  number,
uint8_t  dots,
uint8_t  display 
)

display number

Parameters
[in]numbernumber to display (8 digits max)
[in]dotsset bit if dot on corresponding digit should be displayed
[in]displaydisplay number in chain (0xff for all)

Definition at line 254 of file led_max7219.c.

◆ led_max7219_off()

void led_max7219_off ( uint8_t  display)

switch display off

Parameters
[in]displaydisplay number in chain (0xff for all)

Definition at line 214 of file led_max7219.c.

◆ led_max7219_on()

void led_max7219_on ( uint8_t  display)

switch display on

Parameters
[in]displaydisplay number in chain (0xff for all)

Definition at line 209 of file led_max7219.c.

◆ led_max7219_setup()

void led_max7219_setup ( uint8_t  displays)

setup communication with MAX7219 IC

Parameters
[in]displaysnumber of displays in the chain

Definition at line 186 of file led_max7219.c.

◆ led_max7219_test()

void led_max7219_test ( bool  test,
uint8_t  display 
)

switch display in test or normal operation mode

Parameters
[in]testswitch in test mode (else normal operation)
[in]displaydisplay number in chain (0xff for all)

Definition at line 219 of file led_max7219.c.

◆ led_max7219_text()

bool led_max7219_text ( char *  text,
uint8_t  display 
)

display text

Parameters
[in]texttext to display (8 characters)
[in]displaydisplay number in chain (0xff for all)
Note
use first bit of each character to enable dot
Returns
false if string has unsupported characters

Definition at line 240 of file led_max7219.c.