123456789101112131415161718192021222324252627282930313233 |
- /*
- * SPDX-FileCopyrightText: 2022 Helmut Pozimski <helmut@pozimski.eu>
- *
- * SPDX-License-Identifier: GPL-2.0-only
- */
- #include <stdint.h>
- #include <stdbool.h>
- typedef struct {
- uint8_t clk_pin;
- uint8_t dio_pin;
- bool show_colon;
- uint8_t brightness;
- } tm1637_config;
- static const uint16_t NUMERALS[] = {
- 0x3f,
- 0x06,
- 0x5b,
- 0x4f,
- 0x66,
- 0x6d,
- 0x7d,
- 0x07,
- 0x7f,
- 0x6f,
- 0x00
- };
- esp_err_t tm1637_init(tm1637_config *config, uint8_t clk_pint, uint8_t dio_pin, bool show_colon, uint8_t brightness);
- void tm1637_set_segment(tm1637_config *config, uint8_t value, uint8_t segment, bool enable_display);
|