36 lines
1.3 KiB
C++
Raw Normal View History

2025-11-01 13:36:07 -04:00
/*#############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2025 Shaun Reed, all rights reserved ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ##
##############################################################################
*/
#include "main.h"
2025-11-01 13:36:07 -04:00
#include "i2c.h"
#include "lcd.h"
2025-11-01 16:58:50 -04:00
#include "ssd1306.h"
2025-11-01 13:36:07 -04:00
extern "C" void app_main(void)
{
2025-11-01 16:58:50 -04:00
I2C_init(PIN_SDA, PIN_SCL);
IPanelDevice lcd = SSD1306_new();
LCD d = LCD_init(&lcd);
2025-11-01 16:58:50 -04:00
LCD_set_text_with_mode(&d, "Test test 12345678910", LV_LABEL_LONG_SCROLL,
LV_ALIGN_CENTER);
2025-11-01 16:58:50 -04:00
LCD_set_text(&d, "Hello hello hello hello hello hello hello hello!");
LCD_set_text_with_mode(&d, "A random sentence with no meaning at all.",
LV_LABEL_LONG_CLIP, LV_ALIGN_BOTTOM_MID);
sleep(1);
LCD_clear(&d);
LCD_set_text(&d, "Test clearing the screen");
LCD_set_text_with_mode(&d, "Test writing something and overwriting it",
LV_LABEL_LONG_SCROLL, LV_ALIGN_CENTER);
LCD_set_text_at(&d, "Overwrite.", 1);
2025-11-01 13:36:07 -04:00
}