diff --git a/examples/BWRY_Colours/BWRY_Colours.ino b/examples/BWRY_Colours/BWRY_Colours.ino index 2a7d9a6..6262379 100755 --- a/examples/BWRY_Colours/BWRY_Colours.ino +++ b/examples/BWRY_Colours/BWRY_Colours.ino @@ -23,12 +23,12 @@ // #include #include "hV_HAL_Peripherals.h" -// Confifuration -#include "hV_Configuration.h" - // Include application, user and local libraries // #include +// Configuration +#include "hV_Configuration.h" + // Set parameters #define DISPLAY_COLOURS_BWRY 1 #define DISPLAY_CONTRASTS_BWRY 0 @@ -94,6 +94,9 @@ void displayColoursBWRY() #endif // DISPLAY_COLOURS_BWRY // Add setup code +/// +/// @brief Setup +/// void setup() { Serial.begin(115200); @@ -109,14 +112,11 @@ void setup() #if (DISPLAY_COLOURS_BWRY == 1) - Serial.print("DISPLAY_COLOURS_BWRY... "); + Serial.println("DISPLAY_COLOURS_BWRY... "); myScreen.clear(); displayColoursBWRY(); - wait(8); - Serial.println("done"); - #endif // DISPLAY_COLOURS_BWRY Serial.print("White... "); @@ -128,6 +128,9 @@ void setup() } // Add loop code +/// +/// @brief Loop, empty +/// void loop() { delay(1000); diff --git a/examples/BWRY_Contrasts/BWRY_Contrasts.ino b/examples/BWRY_Contrasts/BWRY_Contrasts.ino index dbd26a4..e31a32e 100755 --- a/examples/BWRY_Contrasts/BWRY_Contrasts.ino +++ b/examples/BWRY_Contrasts/BWRY_Contrasts.ino @@ -23,12 +23,12 @@ // #include #include "hV_HAL_Peripherals.h" -// Confifuration -#include "hV_Configuration.h" - // Include application, user and local libraries // #include +// Configuration +#include "hV_Configuration.h" + // Set parameters #define DISPLAY_COLOURS_BWRY 0 #define DISPLAY_CONTRASTS_BWRY 1 @@ -118,7 +118,7 @@ void setup() #if (DISPLAY_CONTRASTS_BWRY == 1) - Serial.print("DISPLAY_CONTRASTS_BWRY... "); + Serial.println("DISPLAY_CONTRASTS_BWRY... "); myScreen.clear(); displayContrastsBWRY(); wait(8); diff --git a/examples/BWRY_Palette/BWRY_Palette.ino b/examples/BWRY_Palette/BWRY_Palette.ino index a0fecb4..281e18d 100755 --- a/examples/BWRY_Palette/BWRY_Palette.ino +++ b/examples/BWRY_Palette/BWRY_Palette.ino @@ -23,12 +23,12 @@ // #include #include "hV_HAL_Peripherals.h" -// Configuration -#include "hV_Configuration.h" - // Include application, user and local libraries // #include +// Configuration +#include "hV_Configuration.h" + // Set parameters #define DISPLAY_COLOURS_BWRY 0 #define DISPLAY_CONTRASTS_BWRY 1 @@ -209,6 +209,9 @@ void displayPaletteBWRY() #endif // DISPLAY_PALETTE_BWRY // Add setup code +/// +/// @brief Setup +/// void setup() { Serial.begin(115200); @@ -224,10 +227,9 @@ void setup() #if (DISPLAY_PALETTE_BWRY == 1) - Serial.print("DISPLAY_PALETTE_BWRY... "); + Serial.println("DISPLAY_PALETTE_BWRY... "); myScreen.clear(); displayPaletteBWRY(); - Serial.println("done"); wait(8); #endif // DISPLAY_PALETTE_BWRY diff --git a/library.properties b/library.properties index 39e017c..454b952 100755 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=PDLS_EXT3_Basic_BWRY -version=7.0.1 +version=7.0.2 author=Rei Vilo for Pervasive Displays maintainer=Rei Vilo sentence=Library for Pervasive Displays iTC red and yellow colour screens and EXT3-1 board diff --git a/src/Screen_EPD_EXT3.cpp b/src/Screen_EPD_EXT3.cpp index d036214..aecdaa0 100755 --- a/src/Screen_EPD_EXT3.cpp +++ b/src/Screen_EPD_EXT3.cpp @@ -25,6 +25,7 @@ // Release 611: Added support for red and yellow colour screens // Release 700: Refactored screen and board functions // Release 701: Improved functions names consistency +// Release 702: Added support for xE2417QS0Ax // // Library header @@ -83,34 +84,65 @@ const uint8_t COG_initialData266QS[48] = 0x44, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x02, 0x02, 0x22, 0x78, 0xd0, 0x00, 0x00, 0x00, }; +const uint8_t COG_initialData417QS[48] = +{ + 0xa5, 0x1c, 0x86, 0x04, 0x01, 0x53, 0x50, 0x51, 0x30, 0x31, 0x4a, 0x04, 0xff, 0xff, 0xff, 0xff, + 0x07, 0x0f, 0x29, 0x01, 0x90, 0x01, 0x2c, 0xc4, 0xc2, 0x1d, 0x0f, 0x0d, 0xaf, 0x00, 0x10, 0x54, + 0x44, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x37, 0x02, 0x02, 0x22, 0xff, 0xff, 0xff, 0xff, 0xff, + // Remaining 48 bytes not used + // 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + // 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + // 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + // 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +}; + void Screen_EPD_EXT3::COG_initial() { // Work settings - //b_sendIndexData(0x01, &COG_initialData[16], 1); // PWR b_sendCommandData8(0x01, COG_initialData[16]); // PWR b_sendIndexData(0x00, &COG_initialData[17], 2); // PSR b_sendIndexData(0x03, &COG_initialData[30], 3); // PFS - b_sendIndexData(0x06, &COG_initialData[23], 7); // BTST_P - //b_sendIndexData(0x50, &COG_initialData[39], 1); // CDI + + if (u_eScreen_EPD_EXT3 == eScreen_EPD_EXT3_417_BWRY) + { + if (COG_initialData[2] == 0x86) + { + b_sendIndexData(0x06, &COG_initialData[23], 3); // BTST_P + } + else if (COG_initialData[2] == 0x82) + { + b_sendIndexData(0x06, &COG_initialData[23], 4); // BTST_P + } + else + { + Serial.println(); + Serial.println("* ERROR - CoG type not supported"); + while(true);; + } + } + else + { + b_sendIndexData(0x06, &COG_initialData[23], 7); // BTST_P + } + b_sendCommandData8(0x50, COG_initialData[39]); // CDI b_sendIndexData(0x60, &COG_initialData[40], 2); // TCON b_sendIndexData(0x61, &COG_initialData[19], 4); // TRES - //b_sendIndexData(0xE7, &COG_initialData[33], 1); // b_sendCommandData8(0xE7, COG_initialData[33]); // - //b_sendIndexData(0xE3, &COG_initialData[42], 1); // PWS b_sendCommandData8(0xE3, COG_initialData[42]); // PWS - //b_sendIndexData(0x4D, &COG_initialData[43], 1); // - b_sendCommandData8(0x4D, COG_initialData[43]); // - //b_sendIndexData(0xB4, &COG_initialData[44], 1); // - b_sendCommandData8(0xB4, COG_initialData[44]); // - //b_sendIndexData(0xB5, &COG_initialData[45], 1); // - b_sendCommandData8(0xB5, COG_initialData[45]); // - - // uint8_t index_E9[] = {0x01}; - //b_sendIndexData(0xE9, index_E9, 1); // + + if (u_eScreen_EPD_EXT3 == eScreen_EPD_EXT3_417_BWRY) + { + b_sendIndexData(0x65, &COG_initialData[34], 4); // TRES + } + else + { + b_sendCommandData8(0x4D, COG_initialData[43]); // + b_sendCommandData8(0xB4, COG_initialData[44]); // + b_sendCommandData8(0xB5, COG_initialData[45]); // + } + b_sendCommandData8(0xE9, 0x01); // - // uint8_t index_30[] = {0x08}; - //b_sendIndexData(0x30, index_30, 1); // PLL b_sendCommandData8(0x30, 0x08); // PLL } @@ -136,6 +168,11 @@ void Screen_EPD_EXT3::COG_getUserData() COG_initialData = COG_initialData266QS; break; + case 0x410a: // 4.17” + + COG_initialData = COG_initialData417QS; + break; + default: break; @@ -144,17 +181,36 @@ void Screen_EPD_EXT3::COG_getUserData() void Screen_EPD_EXT3::COG_sendImageDataGlobal() { + if (u_eScreen_EPD_EXT3 == eScreen_EPD_EXT3_417_BWRY) // 417: 0x04 before sending image + { + b_sendCommand8(0x04); // Power on + digitalWrite(b_pin.panelCS, HIGH); // CS# = 1 + b_waitBusy(); + } + +#if (SRAM_MODE == USE_INTERNAL_MCU) + b_sendIndexData(0x10, u_newImage, u_frameSize); // First frame, blackBuffer + +#elif (SRAM_MODE == USE_EXTERNAL_SPI) + + b_sendIndexDataSRAM(0x10, u_newImage, u_frameSize); // First frame + +#endif // SRAM_MODE } void Screen_EPD_EXT3::COG_update() { - b_sendCommand8(0x04); // Power on - digitalWrite(b_pin.panelCS, HIGH); // CS# = 1 - b_waitBusy(); + if (u_eScreen_EPD_EXT3 == eScreen_EPD_EXT3_417_BWRY) + { + } + else // All except 417: 0x04 after sending image + { + b_sendCommand8(0x04); // Power on + digitalWrite(b_pin.panelCS, HIGH); // CS# = 1 + b_waitBusy(); + } - // uint8_t data12[] = {0x00}; - //b_sendIndexData(0x12, data12, 1); // Display Refresh b_sendCommandData8(0x12, 0x00); // Display Refresh digitalWrite(b_pin.panelCS, HIGH); // CS# = 1 b_waitBusy(); @@ -162,11 +218,18 @@ void Screen_EPD_EXT3::COG_update() void Screen_EPD_EXT3::COG_powerOff() { - uint8_t data02[] = {0x00}; - //b_sendIndexData(0x02, data02, 1); // Turn off DC/DC b_sendCommandData8(0x02, 0x00); // Turn off DC/DC digitalWrite(b_pin.panelCS, HIGH); // CS# = 1 b_waitBusy(); + + if (u_eScreen_EPD_EXT3 == eScreen_EPD_EXT3_417_BWRY) + { + if (COG_initialData[43] == 0xff) + { + delay(5000); + b_sendIndexData(0x00, &COG_initialData[26], 2); // PSR + } + } } /// @endcond // @@ -194,7 +257,7 @@ void Screen_EPD_EXT3::begin() if (not(u_codeExtra & FEATURE_RED_YELLOW)) { Serial.println(); - Serial.println("ERROR - Not a red and yellow screen"); + Serial.println("* ERROR - Not a black-white-red-yellow screen"); while (true); } @@ -221,12 +284,19 @@ void Screen_EPD_EXT3::begin() _screenDiagonal = 266; break; + case 0x41: // 4.17" + + _screenSizeV = 300; // vertical = wide size + _screenSizeH = 400; // horizontal = small size + _screenDiagonal = 417; + break; + default: break; } // u_codeSize - u_bufferDepth = 1; // 1 buffer with 2 bits per pixel + u_bufferDepth = 1; // 1 single buffer with 2 bits per pixel u_bufferSizeV = _screenSizeV; // vertical = wide size u_bufferSizeH = _screenSizeH / 4; // horizontal = small size 112 / 4; 2 bits per pixel @@ -507,7 +577,7 @@ void Screen_EPD_EXT3::_setPoint(uint16_t x1, uint16_t y1, uint16_t colour) { // Orient and check coordinates are within screen // _orientCoordinates() returns false = success, true = error - if (_orientCoordinates(x1, y1)) + if (_orientCoordinates(x1, y1) == RESULT_ERROR) { return; } @@ -590,25 +660,25 @@ void Screen_EPD_EXT3::_setPoint(uint16_t x1, uint16_t y1, uint16_t colour) if ((colour == myColours.black) xor u_invert) { // physical white = 0-0 - bitClear(u_newImage[z1], b1 + 1); // MSB + bitClear(u_newImage[z1], b1 + 1); // MSB bitClear(u_newImage[z1], b1); } else if ((colour == myColours.white) xor u_invert) { // physical black = 0-1 - bitClear(u_newImage[z1], b1 + 1); // MSB + bitClear(u_newImage[z1], b1 + 1); // MSB bitSet(u_newImage[z1], b1); } else if (colour == myColours.yellow) { // physical yellow = 1-0 - bitSet(u_newImage[z1], b1 + 1); // MSB + bitSet(u_newImage[z1], b1 + 1); // MSB bitClear(u_newImage[z1], b1); } else if (colour == myColours.red) { // physical red = 1-1 - bitSet(u_newImage[z1], b1 + 1); // MSB + bitSet(u_newImage[z1], b1 + 1); // MSB bitSet(u_newImage[z1], b1); } } @@ -620,7 +690,7 @@ void Screen_EPD_EXT3::_setOrientation(uint8_t orientation) bool Screen_EPD_EXT3::_orientCoordinates(uint16_t & x, uint16_t & y) { - bool _flagError = true; // false = success, true = error + bool _flagResult = RESULT_ERROR; // false = success, true = error switch (_orientation) { case 3: // checked, previously 1 @@ -628,7 +698,7 @@ bool Screen_EPD_EXT3::_orientCoordinates(uint16_t & x, uint16_t & y) if ((x < _screenSizeV) and (y < _screenSizeH)) { x = _screenSizeV - 1 - x; - _flagError = false; + _flagResult = RESULT_SUCCESS; } break; @@ -639,7 +709,7 @@ bool Screen_EPD_EXT3::_orientCoordinates(uint16_t & x, uint16_t & y) x = _screenSizeH - 1 - x; y = _screenSizeV - 1 - y; swap(x, y); - _flagError = false; + _flagResult = RESULT_SUCCESS; } break; @@ -648,7 +718,7 @@ bool Screen_EPD_EXT3::_orientCoordinates(uint16_t & x, uint16_t & y) if ((x < _screenSizeV) and (y < _screenSizeH)) { y = _screenSizeH - 1 - y; - _flagError = false; + _flagResult = RESULT_SUCCESS; } break; @@ -657,12 +727,12 @@ bool Screen_EPD_EXT3::_orientCoordinates(uint16_t & x, uint16_t & y) if ((x < _screenSizeH) and (y < _screenSizeV)) { swap(x, y); - _flagError = false; + _flagResult = RESULT_SUCCESS; } break; } - return _flagError; + return _flagResult; } uint16_t Screen_EPD_EXT3::_getPoint(uint16_t x1, uint16_t y1) @@ -704,3 +774,11 @@ void Screen_EPD_EXT3::regenerate() // === End of Class section // +// +// === Touch section +// + +// +// === End of Touch section +// + diff --git a/src/Screen_EPD_EXT3.h b/src/Screen_EPD_EXT3.h index 108c222..f536d2b 100755 --- a/src/Screen_EPD_EXT3.h +++ b/src/Screen_EPD_EXT3.h @@ -16,10 +16,11 @@ /// * 1.54 reference xE2154QS0Fx /// * 2.13 reference xE2213QS0Fx /// * 2.66 reference xE2266QS0Fx +/// * 4.17 reference xE2417QS0Ax /// /// @author Rei Vilo -/// @date 21 Oct 2023 -/// @version 701 +/// @date 21 Nov 2023 +/// @version 702 /// /// @copyright (c) Rei Vilo, 2010-2023 /// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) @@ -54,8 +55,8 @@ #error Required hV_HAL_PERIPHERALS_RELEASE 700 #endif // hV_HAL_PERIPHERALS_RELEASE -#if (hV_CONFIGURATION_RELEASE < 700) -#error Required hV_CONFIGURATION_RELEASE 700 +#if (hV_CONFIGURATION_RELEASE < 702) +#error Required hV_CONFIGURATION_RELEASE 702 #endif // hV_CONFIGURATION_RELEASE #if (hV_SCREEN_BUFFER_RELEASE < 700) @@ -70,7 +71,7 @@ /// /// @brief Library release number /// -#define SCREEN_EPD_EXT3_RELEASE 701 +#define SCREEN_EPD_EXT3_RELEASE 702 /// /// @brief Library variant @@ -103,6 +104,7 @@ class Screen_EPD_EXT3 final : public hV_Screen_Buffer, public hV_Utilities_PDLS /// @brief Constructor with default pins /// @param eScreen_EPD_EXT3 size and model of the e-screen /// @param board board configuration + /// @note Frame-buffer generated by the class /// @note To be used with begin() with no parameter /// Screen_EPD_EXT3(eScreen_EPD_EXT3_t eScreen_EPD_EXT3, pins_t board); @@ -162,7 +164,7 @@ class Screen_EPD_EXT3 final : public hV_Screen_Buffer, public hV_Utilities_PDLS /// @brief Check and orient coordinates, logical coordinates /// @param x x-axis coordinate, modified /// @param y y-axis coordinate, modified - /// @return false = success, true = error + /// @return RESULT_SUCCESS = false = success, RESULT_ERROR = true = error /// bool _orientCoordinates(uint16_t & x, uint16_t & y); // compulsory diff --git a/src/hV_Common.h b/src/hV_Common.h index 48b4cd4..ef1ca1a 100755 --- a/src/hV_Common.h +++ b/src/hV_Common.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Oct 2023 -/// @version 701 +/// @date 21 Nov 2023 +/// @version 702 /// /// @copyright (c) Rei Vilo, 2010-2023 /// @copyright All rights reserved @@ -26,7 +26,7 @@ /// /// @brief Library release number /// -#define hV_COMMON_RELEASE 701 +#define hV_COMMON_RELEASE 702 // SDK #include "hV_HAL_Peripherals.h" diff --git a/src/hV_Configuration.h b/src/hV_Configuration.h index fbea970..b751450 100755 --- a/src/hV_Configuration.h +++ b/src/hV_Configuration.h @@ -19,8 +19,8 @@ /// * 11. Set storage mode, not implemented /// /// @author Rei Vilo -/// @date 21 Oct 2023 -/// @version 701 +/// @date 21 Nov 2023 +/// @version 702 /// /// @copyright (c) Rei Vilo, 2010-2023 /// @copyright All rights reserved @@ -41,6 +41,9 @@ // SDK #include "hV_HAL_Peripherals.h" +// List of options +#include "hV_List_Options.h" + // List of constants #include "hV_List_Constants.h" @@ -59,15 +62,15 @@ #error Required hV_LIST_BOARDS_RELEASE 700 #endif // hV_LIST_BOARDS_RELEASE -#if (hV_LIST_SCREENS_RELEASE < 700) -#error Required hV_LIST_SCREENS_RELEASE 700 +#if (hV_LIST_SCREENS_RELEASE < 702) +#error Required hV_LIST_SCREENS_RELEASE 702 #endif // hV_LIST_SCREENS_RELEASE #ifndef hV_CONFIGURATION_RELEASE /// /// @brief Release /// -#define hV_CONFIGURATION_RELEASE 701 +#define hV_CONFIGURATION_RELEASE 702 /// /// @name 1- List of supported Pervasive Displays screens @@ -80,126 +83,18 @@ /// /// -/// @name 3- Set font mode -/// @details From header files or from external flash -/// * Basic edition: Terminal font -/// * Evaluation edition: DejaVu font as header -/// * Commercial edition: DejaVu font as either header or external SPI Flash -/// @note USE_FONT_HEADER requires addFont() -/// @note Font Manager requires USE_FONT_HEADER -/// @warning 8- and 16-bit MCUs may limit the size of the fonts. Use 32-bit MCUs for optimal performance. -/// -/// @{ -#define USE_FONT_TERMINAL 1 ///< Use default Terminal fonts - -#define FONT_MODE USE_FONT_TERMINAL ///< Selected option -/// @} - -/// -/// @brief 4- Maximum number of fonts -/// @details With MCU Flash, based on available memory, check performed at compilation -/// * USE_FONT_TERMINAL: 1..4 -/// * USE_FONT_HEADER: 1..64 -/// -/// With SPI Flash, based on the fonts previously uploaded -/// * USE_FONT_FLASH: eg. 64 -/// -#if (FONT_MODE == USE_FONT_TERMINAL) -#define MAX_FONT_SIZE 4 -#else -#define MAX_FONT_SIZE 64 -#endif - -/// -/// @name 5- Set SRAM memory -/// @details From internal MCU or external SPI -/// * Basic edition: MCU internal SRAM -/// * Commercial edition: MCU internal SRAM -/// * Evaluation edition: MCU internal or SPI external SRAM -/// -/// @{ -#define USE_INTERNAL_MCU 1 ///< Use MCU internal - -#define SRAM_MODE USE_INTERNAL_MCU ///< Selected option -/// @} - -/// -/// @name 6- Use virtual object -/// @details From hV_Screen_Virtual.h for extended compability -/// @note Declare additional variables if USE_hV_SCREEN_SELF -/// @n Virtual object requires ~1 kB bytes. -/// * Basic edition: self option -/// * Evaluation edition: virtual option -/// * Commercial edition: self and virtual options -/// @note Recommended: USE_hV_SCREEN_VIRTUAL -/// @warning Issues with virtual function on arm-none-eabi-g++ 4.9.3: use USE_hV_SCREEN_SELF instead. -/// @{ -#define USE_hV_SCREEN_SELF 2 ///< Do not use virtual object - -#define USE_hV_SCREEN USE_hV_SCREEN_SELF ///< Selected option -/// @} - -/// -/// @name 7- Set touch mode -/// @details Only two screens are ready for touch -/// * Basic edition: iTC 2.71 BW and iTC 3.70 BW -/// * Evaluation edition: iTC 2.71 BW and iTC 3.70 BW -/// * Commercial edition: iTC 2.71 BW and iTC 3.70 BW -/// @note Touch uses I2C and polling over interrupt -/// @{ -#define USE_TOUCH_NONE 0 ///< Do not use touch -#define USE_TOUCH_YES 1 ///< Use touch - -#define TOUCH_MODE USE_TOUCH_NONE ///< Selected option -/// @} - -/// -/// @brief 8- Set haptic feedback mode -/// * Basic edition: no haptic feedback -/// * Evaluation edition: ERM or LRA -/// * Commercial edition: ERM or LRA -/// -/// @{ -#define USE_HAPTICS_NONE 0 ///< No motor - -#define HAPTICS_MODE USE_HAPTICS_NONE ///< Selected option -/// @} - +/// @name 3- Font mode, internal MCU or external SPI Flash +/// @name 4- Maximum number of fonts +/// @name 5- SRAM memory, internal MCU or external SPI +/// @name 6- Use self or virtual object +/// @name 7- Touch mode, activated or not +/// @name 8- Haptic feedback mode, activated or not +/// @name 9. Set GPIO expander mode, not implemented +/// @name 10. String object of char array options for string. +/// @name 11. Set storage mode, serial console by default /// -/// @brief 9- Set GPIO expander mode -/// * Basic edition: no expander -/// * Evaluation edition: PCF8574 or PCA9536 -/// * Commercial edition: PCF8574 or PCA9536 +/// @see hV_List_Options.h /// -/// @{ -#define USE_EXPANDER_NONE 0 ///< No I2C expander - -#define EXPANDER_MODE USE_EXPANDER_NONE ///< Selected option -/// @} - -/// -/// @brief 10- Set string mode -/// * Basic edition: String object -/// * Evaluation edition: char array -/// * Commercial edition: String object or char array -/// -/// @{ -#define USE_STRING_OBJECT 1 - -#define STRING_MODE USE_STRING_OBJECT -/// @} - -/// -/// @brief 11- Storage mode -/// * Basic edition: none -/// * Evaluation edition: none -/// * Commercial edition: option -/// -/// @{ -#define USE_NONE 0 ///< No storage - -#define STORAGE_MODE USE_NONE ///< Selected options -/// @} #endif // hV_CONFIGURATION_RELEASE diff --git a/src/hV_Documentation.h b/src/hV_Documentation.h index 554374c..553abb7 100755 --- a/src/hV_Documentation.h +++ b/src/hV_Documentation.h @@ -20,7 +20,8 @@ /// /// * **PDLS_EXT3_Basic** for [monochrome](https://www.pervasivedisplays.com/products/?_sft_product_colour=black-white) and [colour (black-white-red)](https://www.pervasivedisplays.com/products/?_sft_product_colour=black-white-red) screens; /// * **PDLS_EXT3_Basic_Fast** for [monochrome screens with embedded fast update](https://www.pervasivedisplays.com/product/2-71-e-ink-display-aurora-mb-v231/); -/// * **PDLS_EXT3_Basic_Touch** for [monochrome screens with capacitive touch](https://www.pervasivedisplays.com/product/2-71-e-ink-display-aurora-mb-v231/). +/// * **PDLS_EXT3_Basic_Fast_152** for the 1.52 and 1.50 monochrome high-definition screens with embedded fast update; +/// * **PDLS_EXT3_Basic_Touch** for [monochrome screens with capacitive touch](https://www.pervasivedisplays.com/product/2-71-e-ink-display-aurora-mb-v231/); and /// * **PDLS_EXT3_Basic_BWRY** for [black-white-red-yellow screens](https://www.pervasivedisplays.com/product/). /// /// The screens are connected to the [EPD Extension Kit Gen 3 (EXT3 or EXT3-1)](https://www.pervasivedisplays.com/product/epd-extension-kit-gen-3-EXT3/) and [Touch Expansion Board for EXT3 (EXT3-Touch)](https://www.pervasivedisplays.com/product/touch-expansion-board-ext3-touch/). @@ -41,8 +42,8 @@ /// Additionally, the **[Wiki](https://docs.pervasivedisplays.com/)** provides a gradual introduction to the e-paper technology and how to use it. /// /// @author Rei Vilo -/// @date 21 Sep 2023 -/// @version 700 +/// @date 21 Nov 2023 +/// @version 702 /// /// @copyright © Rei Vilo, 2010-2023 /// @copyright All rights reserved diff --git a/src/hV_Font_Terminal.h b/src/hV_Font_Terminal.h index 5fc2d88..01703b7 100755 --- a/src/hV_Font_Terminal.h +++ b/src/hV_Font_Terminal.h @@ -197,7 +197,6 @@ class hV_Font_Terminal uint8_t f_fontSpaceX; ///< pixels between two characters, horizontal axis uint8_t f_fontSpaceY; ///< pixels between two characters, vertical axis bool f_fontSolid; ///< - }; /// @endcond diff --git a/src/hV_List_Options.h b/src/hV_List_Options.h index aa71bcb..f2707a0 100755 --- a/src/hV_List_Options.h +++ b/src/hV_List_Options.h @@ -6,25 +6,28 @@ /// @n Based on highView technology /// /// @n Content -/// * 3- Font mode, internal MCU or external SPI Flash +/// * 3- Font mode, internal MCU for basic edition /// * 4- Maximum number of fonts -/// * 5- SRAM memory, internal MCU or external SPI -/// * 6- Use self or virtual object +/// * 5- SRAM memory, internal MCU for basic edition +/// * 6- Use self for basic edition /// * 7- Touch mode, activated or not -/// * 8- Haptic feedback mode, activated or not +/// * 8- Haptic feedback mode, not implemented /// * 9. Set GPIO expander mode, not implemented -/// * 10. String object of char array options for string. -/// * 11. Set storage mode, serial console by default +/// * 10. String object for basic edition +/// * 11. Set storage mode, not implemented /// /// @author Rei Vilo -/// @date 21 Oct 2023 -/// @version 701 +/// @date 21 Nov 2023 +/// @version 702 /// /// @copyright (c) Rei Vilo, 2010-2023 /// @copyright All rights reserved /// /// * Basic edition: for hobbyists and for basic usage /// @n Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// @see https://creativecommons.org/licenses/by-sa/4.0/ +/// +/// @n Consider the Evaluation or Commercial editions for professionals or organisations and for commercial usage /// /// * Evaluation edition: for professionals or organisations, evaluation only, no commercial usage /// @n All rights reserved @@ -37,7 +40,17 @@ /// /// @brief Release /// -#define hV_LIST_OPTIONS_RELEASE 701 +#define hV_LIST_OPTIONS_RELEASE 702 + +/// +/// @name 1- List of supported Pervasive Displays screens +/// @see hV_List_Screens.h +/// + +/// +/// @name 2- List of pre-configured boards +/// @see hV_List_Boards.h +/// /// /// @name 3- Set font mode @@ -51,11 +64,8 @@ /// /// @{ #define USE_FONT_TERMINAL 1 ///< Use default Terminal fonts -#define USE_FONT_HEADER 2 ///< Use fonts from header files -#define USE_FONT_FLASH 3 ///< Use fonts from external SPI Flash memory -#define USE_FONT_INTERNAL 4 ///< Use fonts from internal CGU -#define FONT_MODE USE_FONT_HEADER ///< Selected option +#define FONT_MODE USE_FONT_TERMINAL ///< Selected option /// @} /// @@ -82,7 +92,6 @@ /// /// @{ #define USE_INTERNAL_MCU 1 ///< Use MCU internal -#define USE_EXTERNAL_SPI 2 ///< Use SPI External #define SRAM_MODE USE_INTERNAL_MCU ///< Selected option /// @} @@ -98,10 +107,9 @@ /// @note Recommended: USE_hV_SCREEN_VIRTUAL /// @warning Issues with virtual function on arm-none-eabi-g++ 4.9.3: use USE_hV_SCREEN_SELF instead. /// @{ -#define USE_hV_SCREEN_VIRTUAL 1 ///< Use virtual object #define USE_hV_SCREEN_SELF 2 ///< Do not use virtual object -#define USE_hV_SCREEN USE_hV_SCREEN_VIRTUAL ///< Selected option +#define USE_hV_SCREEN USE_hV_SCREEN_SELF ///< Selected option /// @} /// @@ -115,7 +123,7 @@ #define USE_TOUCH_NONE 0 ///< Do not use touch #define USE_TOUCH_YES 1 ///< Use touch -#define TOUCH_MODE USE_TOUCH_YES ///< Selected option +#define TOUCH_MODE USE_TOUCH_NONE ///< Selected option /// @} /// @@ -126,8 +134,6 @@ /// /// @{ #define USE_HAPTICS_NONE 0 ///< No motor -#define USE_DRV2605L_ERM 1 ///< DRV2605L with ERM = eccentric rotating mass -#define USE_DRV2605L_LRA 2 ///< DRV2605L with LRA = linear resonant actuator #define HAPTICS_MODE USE_HAPTICS_NONE ///< Selected option /// @} @@ -140,9 +146,6 @@ /// /// @{ #define USE_EXPANDER_NONE 0 ///< No I2C expander -#define USE_I2C_PCF8574 1 ///< PCF8574 8 ports GPIO I2C 100 kHz expander -#define USE_I2C_PCA9536 2 ///< PCA9536 4 ports GPIO I2C 400 kHz expander -#define USE_I2C_TCA6408 3 ///< TCA6408 8 ports GPIO I2C 400 kHz expander #define EXPANDER_MODE USE_EXPANDER_NONE ///< Selected option /// @} @@ -155,9 +158,8 @@ /// /// @{ #define USE_STRING_OBJECT 1 -#define USE_CHAR_ARRAY 2 -#define STRING_MODE USE_CHAR_ARRAY +#define STRING_MODE USE_STRING_OBJECT /// @} /// @@ -166,20 +168,11 @@ /// * Evaluation edition: none /// * Commercial edition: option /// -/// @note Options can be combined -/// @code {.cpp} -/// #define STORAGE_MODE (USE_SD_CARD | USE_SPI_FLASH) -/// #define STORAGE_MODE (USE_LINUX_FILES | USE_SERIAL_CONSOLE) -/// @endcode -/// /// @{ #define USE_NONE 0 ///< No storage -#define USE_SD_CARD 1 ///< SD card -#define USE_SPI_FLASH 2 ///< External SPI Flash -#define USE_SERIAL_CONSOLE 4 ///< Serial console for writing only -#define USE_LINUX_FILES 8 ///< For Linux native applications -#define STORAGE_MODE USE_SERIAL_CONSOLE ///< Selected options +#define STORAGE_MODE USE_NONE ///< Selected options /// @} #endif // hV_LIST_OPTIONS_RELEASE + diff --git a/src/hV_List_Screens.h b/src/hV_List_Screens.h index 27e1d70..5cfa181 100755 --- a/src/hV_List_Screens.h +++ b/src/hV_List_Screens.h @@ -10,8 +10,8 @@ /// * 1- List of supported Pervasive Displays screens /// /// @author Rei Vilo -/// @date 21 Sep 2023 -/// @version 700 +/// @date 21 Nov 2023 +/// @version 702 /// /// @copyright (c) Rei Vilo, 2010-2023 /// @copyright All rights reserved @@ -33,7 +33,7 @@ /// /// @brief Release /// -#define hV_LIST_SCREENS_RELEASE 700 +#define hV_LIST_SCREENS_RELEASE 702 /// /// @brief Screen type @@ -63,7 +63,7 @@ /// @} /// -/// @name Colour black-white-red Spectra screens +/// @name Colour black-white-red "Spectra" screens /// @note Global update mode /// @see https://www.pervasivedisplays.com/products/?_sft_etc_itc=itc&_sft_product_colour=black-white-red /// @{ @@ -85,7 +85,7 @@ /// @} /// -/// @name Colour black-white-red-yellow Spectra 4 screens +/// @name Colour black-white-red-yellow "Spectra 4" screens /// @note Global update mode /// @see https://www.pervasivedisplays.com/products/?_sft_etc_itc=itc&_sft_product_colour=black-white-red-yellow /// @{ @@ -93,6 +93,7 @@ #define eScreen_EPD_EXT3_154_BWRY (uint32_t)0x20150F ///< reference xE2154QS0Fx #define eScreen_EPD_EXT3_213_BWRY (uint32_t)0x20210F ///< reference xE2213QS0Fx #define eScreen_EPD_EXT3_266_BWRY (uint32_t)0x20260F ///< reference xE2266QS0Fx +#define eScreen_EPD_EXT3_417_BWRY (uint32_t)0x20410A ///< reference xE2417QS0Ax /// @} /// @@ -139,12 +140,16 @@ /// @see https://www.pervasivedisplays.com/products/?_sft_etc_itc=pu+itc&_sft_temperature_range=m15c-to-p60c /// @{ /// +#define eScreen_EPD_EXT3_150_0J_Wide (uint32_t)0x49154A ///< reference xE2150KS0Jx +#define eScreen_EPD_EXT3_152_0J_Wide (uint32_t)0x49154A ///< reference xE2152KS0Jx #define eScreen_EPD_EXT3_154_0C_Wide (uint32_t)0x09150C ///< reference xE2154KS0Cx +#define eScreen_EPD_EXT3_206_0E_Wide (uint32_t)0x09200E ///< reference xE2206KS0Ex #define eScreen_EPD_EXT3_213_0E_Wide (uint32_t)0x09210E ///< reference xE2213KS0Ex #define eScreen_EPD_EXT3_266_0C_Wide (uint32_t)0x09260C ///< reference xE2266KS0Cx #define eScreen_EPD_EXT3_271_09_Wide (uint32_t)0x092709 ///< reference xE2271KS09x /// @todo eScreen_EPD_EXT3_287_09_Wide not tested #define eScreen_EPD_EXT3_287_09_Wide (uint32_t)0x092809 ///< reference xE2287PS09x, not tested +#define eScreen_EPD_EXT3_290_0F_Wide (uint32_t)0x09290F ///< reference xE2290KS0Fx #define eScreen_EPD_EXT3_370_0C_Wide (uint32_t)0x09370C ///< reference xE2370KS0Cx #define eScreen_EPD_EXT3_417_0D_Wide (uint32_t)0x09410D ///< reference xE2417KS0Dx /// @todo eScreen_EPD_EXT3_437_0C_Wide not tested @@ -170,13 +175,16 @@ /// @{ /// #define frameSize_EPD_EXT3_150 (uint32_t)(10000) ///< reference xE2150xS0xx +#define frameSize_EPD_EXT3_152 (uint32_t)(10000) ///< reference xE2152xS0xx #define frameSize_EPD_EXT3_154 (uint32_t)(5776) ///< reference xE2154xS0xx +#define frameSize_EPD_EXT3_206 (uint32_t)(7936) ///< reference xE2206xS0xx #define frameSize_EPD_EXT3_213 (uint32_t)(5512) ///< reference xE2213xS0xx #define frameSize_EPD_EXT3_266 (uint32_t)(11248) ///< reference xE2266xS0xx #define frameSize_EPD_EXT3_270 (uint32_t)(11616) ///< reference xE2271xS0xx, legacy name #define frameSize_EPD_EXT3_271 (uint32_t)(11616) ///< reference xE2271xS0xx #define frameSize_EPD_EXT3_287 (uint32_t)(9472) ///< reference xE2287xS0xx #define frameSize_EPD_EXT3_290 (uint32_t)(16128) ///< reference xE2290xS0xx +#define frameSize_EPD_EXT3_350 (uint32_t)(24960) ///< reference xE2350xS0xx #define frameSize_EPD_EXT3_370 (uint32_t)(24960) ///< reference xE2370xS0xx #define frameSize_EPD_EXT3_417 (uint32_t)(30000) ///< reference xE2417xS0xx #define frameSize_EPD_EXT3_437 (uint32_t)(21120) ///< reference xE2437xS0xx diff --git a/src/hV_Screen_Buffer.h b/src/hV_Screen_Buffer.h index 208130e..b3e665d 100755 --- a/src/hV_Screen_Buffer.h +++ b/src/hV_Screen_Buffer.h @@ -357,7 +357,7 @@ class hV_Screen_Buffer : protected hV_Font_Terminal /// @brief Orient coordinates and check within screen /// @param[out] x1 x coordinate /// @param[out] y1 y coordinate - /// @return false = success, true = error + /// @return RESULT_SUCCESS = false = success, RESULT_ERROR = true = error /// virtual bool _orientCoordinates(uint16_t & x1, uint16_t & y1) = 0; // compulsory diff --git a/src/hV_Utilities_Common.h b/src/hV_Utilities_Common.h index 4024db4..ced5189 100755 --- a/src/hV_Utilities_Common.h +++ b/src/hV_Utilities_Common.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Sep 2023 -/// @version 700 +/// @date 21 Nov 2023 +/// @version 702 /// /// @copyright (c) Rei Vilo, 2010-2023 /// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) @@ -29,7 +29,7 @@ /// /// @brief Library release number /// -#define hV_UTILITIES_RELEASE 700 +#define hV_UTILITIES_RELEASE 702 #ifndef min #define min(a, b) ((a) < (b) ? (a) : (b))