Standardize how we turn on the keyscanner power net

jesse/wip/gd32-win
Jesse Vincent 3 years ago
parent d6b7d7d4c8
commit eb7d4325a6
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -48,10 +48,7 @@ driver::keyboardio::Model100Side Model100Hands::leftHand(0);
driver::keyboardio::Model100Side Model100Hands::rightHand(3); driver::keyboardio::Model100Side Model100Hands::rightHand(3);
void Model100Hands::setup(void) { void Model100Hands::setup(void) {
delay(100); Model100KeyScanner::enableScannerPower();
pinMode(PB9, OUTPUT_OPEN_DRAIN);
digitalWrite(PB9, LOW);
delay(105); // TODO remove this when we remove it from the attiny code
Wire.begin(); Wire.begin();
Wire.setClock(400000); Wire.setClock(400000);

@ -102,6 +102,8 @@ class Model100KeyScanner : public kaleidoscope::driver::keyscanner::Base<Model10
static uint8_t previousPressedKeyswitchCount(); static uint8_t previousPressedKeyswitchCount();
static void setKeyscanInterval(uint8_t interval); static void setKeyscanInterval(uint8_t interval);
static void enableScannerPower();
static void disableScannerPower();
protected: protected:
static driver::keyboardio::keydata_t leftHandState; static driver::keyboardio::keydata_t leftHandState;
@ -110,8 +112,6 @@ class Model100KeyScanner : public kaleidoscope::driver::keyscanner::Base<Model10
static driver::keyboardio::keydata_t previousRightHandState; static driver::keyboardio::keydata_t previousRightHandState;
static void actOnHalfRow(byte row, byte colState, byte colPrevState, byte startPos); static void actOnHalfRow(byte row, byte colState, byte colPrevState, byte startPos);
static void enableScannerPower();
static void disableScannerPower();
}; };
#else // ifndef KALEIDOSCOPE_VIRTUAL_BUILD #else // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
class Model100KeyScanner; class Model100KeyScanner;

Loading…
Cancel
Save