1234567891011121314151617181920212223242526272829303132 |
- /*
- * 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
- };
- 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);
-
|