CLK on GPIO22, DIO on GPIO27; value/brightness/colon controls and flashable firmware/cyd package. Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
398 B
C
22 lines
398 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
void digit_init();
|
|
|
|
void digit_set_on(bool on);
|
|
bool digit_is_on();
|
|
|
|
/** 显示数值 0..9999(超出钳位) */
|
|
void digit_set_value(int value);
|
|
int digit_get_value();
|
|
|
|
/** 亮度 0..100,映射到 TM1637 8 档 */
|
|
void digit_set_brightness(uint8_t percent);
|
|
uint8_t digit_brightness();
|
|
|
|
void digit_set_colon(bool on);
|
|
bool digit_colon();
|
|
|
|
void digit_clear();
|