led_tm1637.h File Reference

library to communicate with a Titan Micro TM1637 IC attached to a 4-digit 7-segment (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_on (void)
| switch display on More...
bool | led_tm1637_off (void)
| switch display off More...
bool | 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 4-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 communication with TM1637 IC, timer timer used to communication with TM1637 IC

Warning
  all calls are blocking

Definition in file led_tm1637.h.

## Function Documentation

## led_tm1637_brightness()

bool led_tm1637_brightness | ( | enum led_tm1637_brightness_t | brightness | ) |

set display brightness

Parameters

  [in] | brightness | brightness level to set

Returns
  if transmission succeeded

Definition at line 277 of file led_tm1637.c.

## led_tm1637_number()

bool led_tm1637_number | ( | uint16_t | number | ) |

display number

Parameters

  [in] | number | number to display (0-9999)

Returns
  if transmission succeeded

Definition at line 288 of file led_tm1637.c.

## led_tm1637_off()

bool led_tm1637_off | ( | void |  | ) |

switch display off

Returns
  if transmission succeeded

Definition at line 267 of file led_tm1637.c.

## led_tm1637_on()

bool led_tm1637_on | ( | void |  | ) |

switch display on

Returns
  if transmission succeeded

Definition at line 256 of file led_tm1637.c.

## led_tm1637_text()

bool led_tm1637_text | ( | char * | text | ) |

display text

Parameters

  [in] | text | text to display (4 characters)

Note
  use first bit of each character to enable dot

Returns
  if transmission succeeded

Definition at line 310 of file led_tm1637.c.

## led_tm1637_time()

bool led_tm1637_time | ( | uint8_t | hours,
|  | uint8_t | minutes
| ) |  |

display time

Parameters

  [in] | hours | hours to display (0-99)
  [in] | minutes | minutes to display (0-99)

Note
  display separator between hours and minutes

Returns
  if transmission succeeded

Definition at line 299 of file led_tm1637.c.