New touch handler, with issues
This commit is contained in:
@@ -40,6 +40,16 @@ void Cst816S::Init() {
|
||||
*/
|
||||
static constexpr uint8_t motionMask = 0b00000101;
|
||||
twiMaster.Write(twiAddress, 0xEC, &motionMask, 1);
|
||||
|
||||
/*
|
||||
[7] EnTest - Interrupt pin to test, enable automatic periodic issued after a low pulse.
|
||||
[6] EnTouch - When a touch is detected, a periodic pulsed Low.
|
||||
[5] EnChange - Upon detecting a touch state changes, pulsed Low.
|
||||
[4] EnMotion - When the detected gesture is pulsed Low.
|
||||
[0] OnceWLP - Press gesture only issue a pulse signal is low.
|
||||
*/
|
||||
static constexpr uint8_t irqCtl = 0b01110000;
|
||||
twiMaster.Write(twiAddress, 0xFA, &irqCtl, 1);
|
||||
}
|
||||
|
||||
Cst816S::TouchInfos Cst816S::GetTouchInfo() {
|
||||
@@ -90,4 +100,4 @@ void Cst816S::Sleep() {
|
||||
void Cst816S::Wakeup() {
|
||||
Init();
|
||||
NRF_LOG_INFO("[TOUCHPANEL] Wakeup");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user