2017-03-07 16:39:16 +01:00
|
|
|
/* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
/** library to communicate with a Maxim MAX7219 IC attached to a 8-digit 7-segment (API)
|
|
|
|
* @file led_tmax7219.h
|
|
|
|
* @author King Kévin <kingkevin@cuvoodoo.info>
|
|
|
|
* @date 2017
|
|
|
|
* @note peripherals used: GPIO @ref led_max7219_gpio, SPI @ref led_max7219_spi
|
2017-03-07 17:29:32 +01:00
|
|
|
* @warning all calls are blocking
|
2017-03-07 16:39:16 +01:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
/** setup communication with MAX7219 IC
|
|
|
|
*/
|
|
|
|
void led_max7219_setup(void);
|
|
|
|
/** switch display on
|
|
|
|
*/
|
|
|
|
void led_max7219_on(void);
|
|
|
|
/** switch display off
|
|
|
|
*/
|
|
|
|
void led_max7219_off(void);
|
|
|
|
/** switch display in test or normal operation mode
|
|
|
|
* @param[in] test switch in test mode (else normal operation)
|
|
|
|
*/
|
|
|
|
void led_max7219_test(bool test);
|
|
|
|
/** set display intensity
|
|
|
|
* @param[in] intensity level to set (0-15)
|
|
|
|
*/
|
|
|
|
void led_max7219_intensity(uint8_t intensity);
|
|
|
|
/** display text
|
|
|
|
* @param[in] text text to display (8 characters)
|
|
|
|
* @note use first bit of each character to enable dot
|
|
|
|
*/
|
|
|
|
void led_max7219_text(char* text);
|
|
|
|
|