Browse Source

BUTTONS_EXTENSION replaced with EXTENDED_CASE

v0.9.4
Guy Turcotte 2 years ago
parent
commit
ef3a5f8cb8
  1. 2
      CHANGES.md
  2. 2
      README.md
  3. 6
      include/drivers/inkplate_platform.hpp
  4. 2
      include/graphical/inkplate.hpp
  5. 4
      src/drivers/inkplate_platform.cpp

2
CHANGES.md

@ -89,4 +89,4 @@ A hierarchy of frame buffer classes has been added. These allow for flexible ada
## press_keys (.hpp, .cpp)
This class implements the Buttons Extension: 6 mechanical press buttons that replace the touch keys. To be used, at compile time, BUTTONS_EXTENSION must be #defined. The `TouchKeys` class will then **not** be included.
This class implements the Buttons Extension: 6 mechanical press buttons that replace the touch keys. To be used, at compile time, EXTENDED_CASE must be #defined. The `TouchKeys` class will then **not** be included.

2
README.md

@ -2,7 +2,7 @@
(March 3, 2021)
Version 0.9.4: Added `PressKeys` class in support of the Buttons Extended Case as described [here](https://github.com/turgu1/InkPlate-6-Extended-Case). To be used, at compile time, BUTTONS_EXTENSION must be #defined. The `TouchKeys` class will then **not** be included.
Version 0.9.4: Added `PressKeys` class in support of the Buttons Extended Case as described [here](https://github.com/turgu1/InkPlate-6-Extended-Case). To be used, at compile time, EXTENDED_CASE must be #defined. The `TouchKeys` class will then **not** be included.
(March 2, 2021)

6
include/drivers/inkplate_platform.hpp

@ -27,7 +27,7 @@ Distributed as-is; no warranty is given.
#include "eink_6.hpp"
#include "eink_10.hpp"
#if defined(BUTTONS_EXTENSION)
#if defined(EXTENDED_CASE)
#include "press_keys.hpp"
#else
#include "touch_keys.hpp"
@ -36,7 +36,7 @@ Distributed as-is; no warranty is given.
#if __INKPLATE_PLATFORM__
MCP23017 mcp_int(0x20);
Battery battery(mcp_int);
#if defined(BUTTONS_EXTENSION)
#if defined(EXTENDED_CASE)
PressKeys press_keys(mcp_int);
#else
TouchKeys touch_keys(mcp_int);
@ -53,7 +53,7 @@ Distributed as-is; no warranty is given.
#else
extern MCP23017 mcp_int;
extern Battery battery;
#if defined(BUTTONS_EXTENSION)
#if defined(EXTENDED_CASE)
extern PressKeys press_keys;
#else
extern TouchKeys touch_keys;

2
include/graphical/inkplate.hpp

@ -40,7 +40,7 @@ class Inkplate : public Graphics
int8_t readTemperature() { return e_ink.read_temperature(); }
#if defined(BUTTONS_EXTENSION)
#if defined(EXTENDED_CASE)
uint8_t readPresskey(int c) { return press_keys.read_key((PressKeys::Key) c); }
#else
uint8_t readTouchpad(int c) { return touch_keys.read_key((TouchKeys::Key) c); }

4
src/drivers/inkplate_platform.cpp

@ -11,7 +11,7 @@
#include "battery.hpp"
#include "sd_card.hpp"
#if defined(BUTTONS_EXTENSION)
#if defined(EXTENDED_CASE)
#include "press_keys.hpp"
#else
#include "touch_keys.hpp"
@ -32,7 +32,7 @@ InkPlatePlatform::setup()
// Battery
if (!battery.setup()) return false;
#if defined(BUTTONS_EXTENSION)
#if defined(EXTENDED_CASE)
// Setup Press keys
if (!press_keys.setup()) return false;
#else

Loading…
Cancel
Save