LED_shit/main/include/display.h

53 lines
1.7 KiB
C
Raw Normal View History

2025-11-23 18:15:56 +00:00
#pragma once
#include <stdint.h>
#include "esp_err.h"
#include <stdbool.h>
// =======================================================
// ENDEREÇOS I2C (definidos no .c)
// =======================================================
// TOP = 0x71
// BOTTOM = 0x70
// Inicialização dos dois displays
esp_err_t display_init(void);
// =======================================================
// RAW ACCESS (usa 16 bits de segmentos)
// =======================================================
void display_raw_top(int pos, uint16_t mask);
void display_raw_bottom(int pos, uint16_t mask);
void display_clear_top(void);
void display_clear_bottom(void);
void display_set_enabled(bool en);
bool display_is_enabled(void);
// =======================================================
// TEXTO E CARACTERES
// =======================================================
void display_char_top(int pos, char c);
void display_char_bottom(int pos, char c);
void display_text_top(const char *txt); // 4 chars
void display_text_bottom(const char *txt); // 4 chars
// =======================================================
// NÚMEROS (09999)
// =======================================================
void display_digit_top(int pos, uint8_t val);
void display_digit_bottom(int pos, uint8_t val);
void display_number_top(int num);
void display_number_bottom(int num);
// =======================================================
// RELÓGIO (HH:MM com DP entre horas)
// =======================================================
void display_set_time_top(int horas, int minutos);
// =======================================================
// DEBUG
// =======================================================
void display_debug_segment(uint16_t bitmask);