mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-29 14:10:53 +00:00
T-Deck Pro support (#6936)
* initial draft * fix touchscreen * fix touchscreen * optimize GPS * battery management * cleanup comments * enable vibration motor * refactored TCA8418Keyboard * update HW_VENDOR id * manual fixes after merge * fix keyboard/BQ27220 detection * add BQ27220 * modify charge voltage and current * update XpowerLib * design capacity * try-fix charge behavior * improve Vbus detection * moved variant into esp32s3 folder --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com> Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
This commit is contained in:
@@ -188,6 +188,8 @@
|
||||
#define HW_VENDOR meshtastic_HardwareModel_RAK3312
|
||||
#elif defined(LINK_32)
|
||||
#define HW_VENDOR meshtastic_HardwareModel_LINK_32
|
||||
#elif defined(T_DECK_PRO)
|
||||
#define HW_VENDOR meshtastic_HardwareModel_T_DECK_PRO
|
||||
#endif
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
28
src/platform/extra_variants/t_deck_pro/variant.cpp
Normal file
28
src/platform/extra_variants/t_deck_pro/variant.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef T_DECK_PRO
|
||||
|
||||
#include "input/TouchScreenImpl1.h"
|
||||
#include <CSE_CST328.h>
|
||||
#include <Wire.h>
|
||||
|
||||
CSE_CST328 tsPanel = CSE_CST328(EINK_WIDTH, EINK_HEIGHT, &Wire, CST328_PIN_RST, CST328_PIN_INT);
|
||||
|
||||
bool readTouch(int16_t *x, int16_t *y)
|
||||
{
|
||||
if (tsPanel.getTouches()) {
|
||||
*x = tsPanel.getPoint(0).x;
|
||||
*y = tsPanel.getPoint(0).y;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// T-Deck Pro specific init
|
||||
void lateInitVariant()
|
||||
{
|
||||
tsPanel.begin();
|
||||
touchScreenImpl1 = new TouchScreenImpl1(EINK_WIDTH, EINK_HEIGHT, readTouch);
|
||||
touchScreenImpl1->init();
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user