Compare commits

...

5 Commits

Author SHA1 Message Date
Gergely Nagy e0515e4b75
wip
3 years ago
Gergely Nagy 09a8f47169
wip
3 years ago
Gergely Nagy 6eedcc13d2
wip: previous commit needs namespace paths
3 years ago
Gergely Nagy 290739b0c5
wip: disable absolutemouse for now
3 years ago
Jesse Vincent eb7d4325a6
Standardize how we turn on the keyscanner power net
3 years ago

@ -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);

@ -40,6 +40,7 @@ struct cRGB {
#include "kaleidoscope/driver/led/Base.h" #include "kaleidoscope/driver/led/Base.h"
#include "kaleidoscope/device/Base.h" #include "kaleidoscope/device/Base.h"
#include "kaleidoscope/driver/hid/Keyboardio.h" #include "kaleidoscope/driver/hid/Keyboardio.h"
#include "kaleidoscope/driver/hid/Base.h"
#include "kaleidoscope/driver/bootloader/gd32/Base.h" #include "kaleidoscope/driver/bootloader/gd32/Base.h"
namespace kaleidoscope { namespace kaleidoscope {
@ -102,6 +103,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,15 +113,18 @@ 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;
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD #endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
struct Model100HIDProps: public kaleidoscope::driver::hid::KeyboardioProps {
typedef kaleidoscope::driver::hid::base::AbsoluteMouseProps AbsoluteMouseProps;
typedef kaleidoscope::driver::hid::base::AbsoluteMouse<AbsoluteMouseProps> AbsoluteMouse;
};
struct Model100Props : public kaleidoscope::device::BaseProps { struct Model100Props : public kaleidoscope::device::BaseProps {
typedef kaleidoscope::driver::hid::KeyboardioProps HIDProps; typedef Model100HIDProps HIDProps;
typedef kaleidoscope::driver::hid::Keyboardio<HIDProps> HID; typedef kaleidoscope::driver::hid::Keyboardio<HIDProps> HID;
typedef Model100LEDDriverProps LEDDriverProps; typedef Model100LEDDriverProps LEDDriverProps;

Loading…
Cancel
Save