diff --git a/esp/cpp/07_lcd-panel-i2c/main/display.cpp b/esp/cpp/07_lcd-panel-i2c/main/display.cpp index 96e25dc..7c9e44c 100644 --- a/esp/cpp/07_lcd-panel-i2c/main/display.cpp +++ b/esp/cpp/07_lcd-panel-i2c/main/display.cpp @@ -1,4 +1,10 @@ - +/*############################################################################# +## Author: Shaun Reed ## +## Legal: All Content (c) 2025 Shaun Reed, all rights reserved ## +## ## +## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ## +############################################################################## +*/ #include #include @@ -7,9 +13,6 @@ #include "display.h" -// TODO: Remove this dependency by relocating SSD1306::oledb_buffer_ -#include "ssd1306.h" - // Static TimeKeeper for managing ESP timers across all displays. TimeKeeper Display::timers_; diff --git a/esp/cpp/07_lcd-panel-i2c/main/display.h b/esp/cpp/07_lcd-panel-i2c/main/display.h index ecf7db4..3c110a2 100644 --- a/esp/cpp/07_lcd-panel-i2c/main/display.h +++ b/esp/cpp/07_lcd-panel-i2c/main/display.h @@ -1,3 +1,10 @@ +/*############################################################################# +## Author: Shaun Reed ## +## Legal: All Content (c) 2025 Shaun Reed, all rights reserved ## +## ## +## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ## +############################################################################## +*/ #ifndef DISPLAY_H #define DISPLAY_H diff --git a/esp/cpp/07_lcd-panel-i2c/main/i2c.h b/esp/cpp/07_lcd-panel-i2c/main/i2c.h index c6f786b..32a9bc1 100644 --- a/esp/cpp/07_lcd-panel-i2c/main/i2c.h +++ b/esp/cpp/07_lcd-panel-i2c/main/i2c.h @@ -1,3 +1,10 @@ +/*############################################################################# +## Author: Shaun Reed ## +## Legal: All Content (c) 2025 Shaun Reed, all rights reserved ## +## ## +## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ## +############################################################################## +*/ #ifndef I2C_H #define I2C_H diff --git a/esp/cpp/07_lcd-panel-i2c/main/main.cpp b/esp/cpp/07_lcd-panel-i2c/main/main.cpp index b07d640..7016666 100644 --- a/esp/cpp/07_lcd-panel-i2c/main/main.cpp +++ b/esp/cpp/07_lcd-panel-i2c/main/main.cpp @@ -1,3 +1,10 @@ +/*############################################################################# +## Author: Shaun Reed ## +## Legal: All Content (c) 2025 Shaun Reed, all rights reserved ## +## ## +## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ## +############################################################################## +*/ #include "display.h" #include "ssd1306.h" diff --git a/esp/cpp/07_lcd-panel-i2c/main/panel.h b/esp/cpp/07_lcd-panel-i2c/main/panel.h index 17c42aa..85811b4 100644 --- a/esp/cpp/07_lcd-panel-i2c/main/panel.h +++ b/esp/cpp/07_lcd-panel-i2c/main/panel.h @@ -1,3 +1,10 @@ +/*############################################################################# +## Author: Shaun Reed ## +## Legal: All Content (c) 2025 Shaun Reed, all rights reserved ## +## ## +## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ## +############################################################################## +*/ #ifndef PANEL_H #define PANEL_H diff --git a/esp/cpp/07_lcd-panel-i2c/main/panel_device.cpp b/esp/cpp/07_lcd-panel-i2c/main/panel_device.cpp index 2797e22..fb586cd 100644 --- a/esp/cpp/07_lcd-panel-i2c/main/panel_device.cpp +++ b/esp/cpp/07_lcd-panel-i2c/main/panel_device.cpp @@ -1,4 +1,10 @@ - +/*############################################################################# +## Author: Shaun Reed ## +## Legal: All Content (c) 2025 Shaun Reed, all rights reserved ## +## ## +## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ## +############################################################################## +*/ #include "panel_device.h" #include "display.h" #include "scoped_lock.h" diff --git a/esp/cpp/07_lcd-panel-i2c/main/panel_device.h b/esp/cpp/07_lcd-panel-i2c/main/panel_device.h index bc853d1..e58d510 100644 --- a/esp/cpp/07_lcd-panel-i2c/main/panel_device.h +++ b/esp/cpp/07_lcd-panel-i2c/main/panel_device.h @@ -1,3 +1,10 @@ +/*############################################################################# +## Author: Shaun Reed ## +## Legal: All Content (c) 2025 Shaun Reed, all rights reserved ## +## ## +## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ## +############################################################################## +*/ #ifndef PANEL_DEVICE_H #define PANEL_DEVICE_H @@ -336,9 +343,10 @@ private: * Left Right * * The bytes from _LVGL_ are mapped to pixel rows of the display - * [0, 0, 0, 0] - * [0, 0, 0, 0] - * [0, 0, 0, 0] + * 8 bits (pixels) per byte - + * [0, 0, 0, 0, 0, 0, 0, 0] + * [0, 0, 0, 0, 0, 0, 0, 0] + * [0, 0, 0, 0, 0, 0, 0, 0] * * The order of bits expected by the _display driver_ is LSB first. * We must preserve pairing of each bit and pixel when writing to the display. @@ -348,10 +356,21 @@ private: * Left Right * * Bytes expected by the _display driver_ map to pixel columns of the display. + * 8 bits (pixels) per byte - * [0, [0, [0, [0, * 0, 0, 0, 0, + * 0, 0, 0, 0, + * 0, 0, 0, 0, + * 0, 0, 0, 0, + * 0, 0, 0, 0, + * 0, 0, 0, 0, * 0] 0] 0] 0] * + * These layouts in memory have no opinion on the shape of the image. The + * beginning and end of a row or a column for example is entirely dependent + * on how the data is accessed. The vertical and horitzontal resolution may + * vary between displays. + * * For the LV_COLOR_FORMAT_I1 color format we are using, an additional buffer * is needed for transposing the bits to the vertical arrangement required by * the display driver that is outlined above. diff --git a/esp/cpp/07_lcd-panel-i2c/main/scoped_lock.cpp b/esp/cpp/07_lcd-panel-i2c/main/scoped_lock.cpp index ecdd8c7..b0f301d 100644 --- a/esp/cpp/07_lcd-panel-i2c/main/scoped_lock.cpp +++ b/esp/cpp/07_lcd-panel-i2c/main/scoped_lock.cpp @@ -1,3 +1,10 @@ +/*############################################################################# +## Author: Shaun Reed ## +## Legal: All Content (c) 2025 Shaun Reed, all rights reserved ## +## ## +## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ## +############################################################################## +*/ #include "scoped_lock.h" // LVGL library is not thread-safe, this example calls LVGL APIs from tasks. diff --git a/esp/cpp/07_lcd-panel-i2c/main/scoped_lock.h b/esp/cpp/07_lcd-panel-i2c/main/scoped_lock.h index 32dd202..9cd8f64 100644 --- a/esp/cpp/07_lcd-panel-i2c/main/scoped_lock.h +++ b/esp/cpp/07_lcd-panel-i2c/main/scoped_lock.h @@ -1,3 +1,10 @@ +/*############################################################################# +## Author: Shaun Reed ## +## Legal: All Content (c) 2025 Shaun Reed, all rights reserved ## +## ## +## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ## +############################################################################## +*/ #ifndef SCOPED_LOCK_H #define SCOPED_LOCK_H diff --git a/esp/cpp/07_lcd-panel-i2c/main/ssd1306.h b/esp/cpp/07_lcd-panel-i2c/main/ssd1306.h index bb13bfb..b8aadf3 100644 --- a/esp/cpp/07_lcd-panel-i2c/main/ssd1306.h +++ b/esp/cpp/07_lcd-panel-i2c/main/ssd1306.h @@ -1,16 +1,10 @@ -/* - * https://docs.espressif.com/projects/esp-idf/en/v5.3.2/esp32/api-reference/peripherals/lcd/index.html#functional-overview - * - * Implementing the interface draw to an LCD using various interface modes. - * I2C interface mode is SSD1306 - * SPI interface mode is ST7789 - * I80 interface mode is NT35510 or ST7789 - * - * Actually, I think any driver can be used with any interface mode - * Along with additional third party drivers via the component manager - * https://github.com/espressif/esp-idf/tree/0d6099ec533c4b647fb7a7b0b8942bc7aeb82f90/examples/peripherals/lcd/spi_lcd_touch#spi-lcd-and-touch-panel-example - */ - +/*############################################################################# +## Author: Shaun Reed ## +## Legal: All Content (c) 2025 Shaun Reed, all rights reserved ## +## ## +## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ## +############################################################################## +*/ #ifndef SSD1306_H #define SSD1306_H @@ -79,7 +73,6 @@ public: // // PUBLIC METHODS - /// SSD1306 configuration structure. /** * Provides the SSD1306 vendor configuration to IPanelDevice consumers. * diff --git a/esp/cpp/07_lcd-panel-i2c/main/time_keeper.h b/esp/cpp/07_lcd-panel-i2c/main/time_keeper.h index 371a8d5..cd39e32 100644 --- a/esp/cpp/07_lcd-panel-i2c/main/time_keeper.h +++ b/esp/cpp/07_lcd-panel-i2c/main/time_keeper.h @@ -1,3 +1,10 @@ +/*############################################################################# +## Author: Shaun Reed ## +## Legal: All Content (c) 2025 Shaun Reed, all rights reserved ## +## ## +## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ## +############################################################################## +*/ #ifndef TIME_KEEPER_H #define TIME_KEEPER_H