whole 1st line done basically

This commit is contained in:
2026-05-04 23:04:30 +02:00
parent a90a65ba96
commit a82fdd3d33
3 changed files with 32 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
#define LCD_LINES 4
#define LCD_COLS 40
#include <stdbool.h>
#include <stdint.h>
struct lcd_t {
@@ -24,7 +25,7 @@ void lcd_set_custom_char(struct lcd_t* lcd, uint8_t index, const lcd_glyph_t* gl
void lcd_write_str(struct lcd_t* lcd, const char* str, uint8_t len);
void lcd_write_str_pos(struct lcd_t* lcd, const char* str, uint8_t len, uint8_t posX, uint8_t posY);
void lcd_write_buf(struct lcd_t* lcd, uint8_t row, uint8_t col, const char* str);
int lcd_writef(struct lcd_t *lcd, uint8_t offset, const char *fmt, ...);
void lcd_writef(struct lcd_t *lcd, uint8_t x, uint8_t y, const char *fmt, ...) __attribute__((format(printf, 4, 5)));
void lcd_clear_buf(struct lcd_t* lcd);
void lcd_flush_buf(struct lcd_t* lcd);
char lcd_bar(struct lcd_t* lcd, uint8_t char_id, double value);

12
include/sys.h Normal file
View File

@@ -0,0 +1,12 @@
#ifndef LINUXSMARTIE_SYS_H
#define LINUXSMARTIE_SYS_H
struct time_date_t {
char date[12];
char time[9];
};
void sys_get_time(struct time_date_t *td);
void sys_get_load_avg(double *load_avg);
#endif //LINUXSMARTIE_SYS_H