Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
obra committed Nov 15, 2023
1 parent 80b3ccc commit 0ed0906
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ bool FocusSerial::inputMatchesCommand(const char *input, const char *expected) {

bool FocusSerial::isEOL() {
int c = -1;
auto timeout = 1000; // Runtime.serialPort().getTimeout(); // TODO nrf core doesn't expose getTimeout
auto timeout = 1000; // Runtime.serialPort().getTimeout(); // TODO nrf core doesn't expose getTimeout
auto start = millis();


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,16 @@ constexpr uint8_t KeyScannerProps::matrix_col_pins[matrix_columns];
//// `KeyScanner` here refers to the alias set up above, just like in the
//// `KeyScannerProps` case above.
template<>
KeyScanner::row_state_t
kaleidoscope::driver::keyscanner::Simple<kaleidoscope::device::keyboardio::Model101KeyScannerProps>::matrix_state_

[KeyScannerProps::matrix_rows] = {};

KeyScanner::row_state_t
kaleidoscope::driver::keyscanner::Simple<kaleidoscope::device::keyboardio::Model101KeyScannerProps>::matrix_state_

[KeyScannerProps::matrix_rows] = {};


template<>
uint32_t kaleidoscope::driver::keyscanner::Simple<kaleidoscope::device::keyboardio::Model101KeyScannerProps>::next_scan_at_ = 0;



} // namespace keyboardio
} // namespace device
} // namespace kaleidoscope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,16 @@ struct Model101StorageProps : public kaleidoscope::driver::storage::BaseProps {
};




struct Model101KeyScannerProps : public kaleidoscope::driver::keyscanner::SimpleProps {

static constexpr uint8_t matrix_rows = 4;
static constexpr uint8_t matrix_columns = 16;
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr;
static constexpr uint8_t matrix_row_pins[matrix_rows] = {A0, A1, A2, A3};
static constexpr uint8_t matrix_col_pins[matrix_columns] = {A4, A5, SCK, MOSI, MISO, 1,0,2, 22,23, 5, 6, 9, 10, 11, 12};

static constexpr uint8_t matrix_col_pins[matrix_columns] = {A4, A5, SCK, MOSI, MISO, 1, 0, 2, 22, 23, 5, 6, 9, 10, 11, 12};
};



// If we need to override HID props:
struct Model101HIDProps : public kaleidoscope::driver::hid::BaseProps {
//typedef kaleidoscope::driver::hid::base::AbsoluteMouseProps AbsoluteMouseProps;
Expand All @@ -77,7 +73,7 @@ struct Model101Props : public kaleidoscope::device::BaseProps {
typedef kaleidoscope::driver::hid::Base<HIDProps> HID;

typedef kaleidoscope::driver::led::BaseProps LEDDriverProps;
typedef kaleidoscope::driver::led::Base<LEDDriverProps> LEDDriver;
typedef kaleidoscope::driver::led::Base<LEDDriverProps> LEDDriver;

typedef Model101KeyScannerProps KeyScannerProps;
typedef kaleidoscope::driver::keyscanner::Simple<KeyScannerProps> KeyScanner;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

#include <stdint.h> // for uint8_t

#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, MatrixAddr<>::Range
#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_
#include "kaleidoscope/device/device.h" // for Device, cRGB, CRGB, Base<>::HID
#include "kaleidoscope/driver/hid/base/Keyboard.h" // for Keyboard
#include "kaleidoscope/plugin/LEDControl.h" // for LEDControl
#include "kaleidoscope/plugin/LEDControl/LEDUtils.h" // for hsvToRgb
#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, MatrixAddr<>::Range
#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_
#include "kaleidoscope/device/device.h" // for Device, cRGB, CRGB, Base<>::HID
#include "kaleidoscope/driver/hid/base/Keyboard.h" // for Keyboard
#include "kaleidoscope/plugin/LEDControl.h" // for LEDControl
#include "kaleidoscope/plugin/LEDControl/LEDUtils.h" // for hsvToRgb

namespace kaleidoscope {
namespace plugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
#include <Kaleidoscope-FocusSerial.h> // for Focus, FocusSerial
#include <stdint.h> // for uint8_t, uint16_t, int8_t

#include "kaleidoscope/KeyEvent.h" // for KeyEvent
#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_
#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps:...
#include "kaleidoscope/KeyEvent.h" // for KeyEvent
#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_
#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps:...
#include "kaleidoscope/driver/hid/base/AbsoluteMouse.h" // for AbsoluteMouse
#include "kaleidoscope/driver/hid/base/Mouse.h" // for Mouse
#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventH...
#include "kaleidoscope/key_defs.h" // for Key, SYNTHETIC
#include "kaleidoscope/keyswitch_state.h" // for keyToggledOn
#include "kaleidoscope/plugin/mousekeys/MouseKeyDefs.h" // for KEY_MOUSE_BUTTON, KEY_MOUS...
#include "kaleidoscope/plugin/mousekeys/MouseWrapper.h" // for MouseWrapper, WARP_DOWN
#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventH...
#include "kaleidoscope/key_defs.h" // for Key, SYNTHETIC
#include "kaleidoscope/keyswitch_state.h" // for keyToggledOn
#include "kaleidoscope/plugin/mousekeys/MouseKeyDefs.h" // for KEY_MOUSE_BUTTON, KEY_MOUS...
#include "kaleidoscope/plugin/mousekeys/MouseWrapper.h" // for MouseWrapper, WARP_DOWN

namespace kaleidoscope {
namespace plugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

#include <stdint.h> // for uint16_t, uint8_t

#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_
#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps:...
#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_
#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps:...
#include "kaleidoscope/driver/hid/base/AbsoluteMouse.h" // for AbsoluteMouse

namespace kaleidoscope {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#include <Arduino.h> // for delay
#include <stdint.h> // for uint8_t

#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_
#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps::HID
#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_
#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps::HID
#include "kaleidoscope/driver/hid/base/Keyboard.h" // for Keyboard

namespace kaleidoscope {
Expand Down
12 changes: 6 additions & 6 deletions src/kaleidoscope/Runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
#include <Arduino.h> // for millis
#include <HardwareSerial.h> // for HardwareSerial

#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr, MatrixAddr...
#include "kaleidoscope/KeyEvent.h" // for KeyEvent
#include "kaleidoscope/LiveKeys.h" // for LiveKeys, live_keys
#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps::HID
#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr, MatrixAddr...
#include "kaleidoscope/KeyEvent.h" // for KeyEvent
#include "kaleidoscope/LiveKeys.h" // for LiveKeys, live_keys
#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps::HID
#include "kaleidoscope/driver/hid/base/Keyboard.h" // for Keyboard
#include "kaleidoscope/keyswitch_state.h" // for keyToggledOff, keyToggledOn
#include "kaleidoscope/layers.h" // for Layer, Layer_
#include "kaleidoscope/keyswitch_state.h" // for keyToggledOff, keyToggledOn
#include "kaleidoscope/layers.h" // for Layer, Layer_

namespace kaleidoscope {

Expand Down

0 comments on commit 0ed0906

Please sign in to comment.