CuVoodoo STM32F1 firmware template
Enumerations | Functions
led_tm1637.h File Reference

library to communicate with a Titan Micro TM1637 IC attached to a 7-segment displays (API) More...

Go to the source code of this file.

Enumerations

enum  led_tm1637_brightness_t {
  LED_TM1637_1DIV16 = 0, LED_TM1637_2DIV16 = 1, LED_TM1637_4DIV16 = 2, LED_TM1637_10DIV16 = 3,
  LED_TM1637_11DIV16 = 4, LED_TM1637_12DIV16 = 5, LED_TM1637_13DIV16 = 6, LED_TM1637_14DIV16 = 7
}
 display brightness levels
 

Functions

void led_tm1637_setup (void)
 setup communication with TM1637 IC
 
bool led_tm1637_off (void)
 switch display on More...
 
void led_tm1637_brightness (enum led_tm1637_brightness_t brightness)
 set display brightness More...
 
bool led_tm1637_number (uint16_t number)
 display number More...
 
bool led_tm1637_time (uint8_t hours, uint8_t minutes)
 display time More...
 
bool led_tm1637_text (char *text)
 display text More...
 

Detailed Description

library to communicate with a Titan Micro TM1637 IC attached to a 7-segment displays (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 communication with TM1637 IC, timer timer used to communication with TM1637 IC
only 4-digit 7-segment displays are considered as this is the most common case
Warning
all calls are blocking

Definition in file led_tm1637.h.

Function Documentation

◆ led_tm1637_brightness()

void led_tm1637_brightness ( enum led_tm1637_brightness_t  brightness)

set display brightness

Parameters
[in]brightnessbrightness level to set

Definition at line 289 of file led_tm1637.c.

◆ led_tm1637_number()

bool led_tm1637_number ( uint16_t  number)

display number

Parameters
[in]numbernumber to display (0-9999)
Returns
if transmission succeeded

Definition at line 294 of file led_tm1637.c.

◆ led_tm1637_off()

bool led_tm1637_off ( void  )

switch display on

Returns
if transmission succeeded

Definition at line 276 of file led_tm1637.c.

◆ led_tm1637_text()

bool led_tm1637_text ( char *  text)

display text

Parameters
[in]texttext to display (4 characters)
Note
use first bit of each character to enable dot
Returns
if transmission succeeded

Definition at line 306 of file led_tm1637.c.

◆ led_tm1637_time()

bool led_tm1637_time ( uint8_t  hours,
uint8_t  minutes 
)

display time

Parameters
[in]hourshours to display (0-99)
[in]minutesminutes to display (0-99)
Note
display separator between hours and minutes
Returns
if transmission succeeded

Definition at line 300 of file led_tm1637.c.