/* * SPDX-FileCopyrightText: 2022 Helmut Pozimski * * SPDX-License-Identifier: GPL-2.0-only */ #include #include 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 }; esp_err_t tm1637_init(tm1637_config* config, uint8_t clk_pint, uint8_t dio_pin, bool show_colon, uint8_t brightness); esp_err_t tm1637_set_segment(tm1637_config* config, uint8_t value, uint8_t segment);