Commit graph

142 commits

Author SHA1 Message Date
Nick Brassel
9d9cdaaa2d
Add encoder abstraction. (#21548) 2024-02-18 21:17:15 +11:00
Ryan
2d1aed78a6
Update GPIO macro usages in core (#23093) 2024-02-18 17:08:27 +11:00
Ryan
a522b1f156
i2c: rename read/write register functions (#22905) 2024-01-16 02:26:40 +00:00
Joel Challis
ccec4867c8
Align SPLIT_HAND_MATRIX_GRID left/right logic with SPLIT_HAND_PIN (#22775) 2024-01-09 22:24:53 +11:00
Dasky
79094d3f72
Modify split config is_keyboard_master/left checks. (#21875)
* rework split configuration

* Apply suggestions from code review

Co-authored-by: Joel Challis <git@zvecr.com>

* lint

* missed return

---------

Co-authored-by: Joel Challis <git@zvecr.com>
2023-10-22 19:47:39 +01:00
Ryan
6018b56c55
Remove old OLED API code (#21651) 2023-07-31 15:43:10 +01:00
Ryan
d136d49053
Revert "[Bug] Fix compilation error when Split Watchdog enabled" (#21572) 2023-07-22 06:43:14 +10:00
Drashna Jaelre
625671d1cf
[Bug] Fix compilation error when Split Watchdog enabled (#21543) 2023-07-20 18:40:05 -07:00
Ryan
b090354143
haptic: naming cleanups (#21551) 2023-07-21 09:17:39 +10:00
Ryan
da2d2f947d
quantum: remove direct quantum.h includes (#21507) 2023-07-16 23:42:56 +10:00
Evgenii Vilkov
04719c774d
Fix backlight sync on suspend_power_down for split keyboards (#21079) 2023-05-31 11:46:03 -07:00
Giuseppe Rota
e77699a58a
Fix preprocessor condition for SPLIT_HAPTIC_ENABLE (#20411) 2023-04-12 07:22:07 -07:00
ngs-ch
ccda5d2d2f
Make "detected_host_os()" available on the SLAVE side of the split keyboard (#19854)
Co-authored-by: ngs.ch <ngs.ch>
Co-authored-by: Drashna Jaelre <drashna@drashna.net>
2023-04-04 08:48:51 +10:00
Drashna Jaelre
297779385f
Add last activity functions for pointing device (#20079) 2023-03-30 18:27:39 -07:00
Nick Brassel
a518e1e5d8
Sync activity timestamps between sides. (#20192)
Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
2023-03-21 10:16:11 +01:00
jack
9c6942ea40
Remove config.h include from quantum files (#19817) 2023-02-12 02:40:16 +00:00
Drashna Jaelre
b585ece5ef
Add Split support for Haptic feedback (#19203) 2023-01-01 11:56:32 +11:00
Dasky
c255174cf3
Implement split comms watchdog (#18599) 2022-10-06 20:52:42 +11:00
Stefan Kerkmann
c76d2074b6
[Bug] Fix ST7565 handler deadlock (#18609) 2022-10-05 19:22:57 +02:00
Stefan Kerkmann
56f7b34289
[Core] rewrite locking in split transaction handlers (#18417) 2022-10-05 05:49:29 +11:00
Dasky
e1aed8da08
Move fake EE_HANDS (#18352) 2022-09-16 00:06:00 +01:00
Stefan Kerkmann
ed9bdcbc36
[Core] guard RPC invocation by checking RPC info against crc checksum (#17840) 2022-08-06 18:46:59 +10:00
Dasky
62eaec52e0
Init eeconfig before reading handedness (#17256) 2022-06-20 15:31:27 +01:00
Dasky
85b3b98570
Move SPLIT_HAND_PIN setup to split_pre_init (#17271)
* Move SPLIT_HAND_PIN setup to split_pre_init

* doppelganger should use old behaviour

* Add comment for future

Co-authored-by: Joel Challis <git@zvecr.com>

Co-authored-by: Joel Challis <git@zvecr.com>
2022-06-06 01:33:32 +01:00
Dasky
af02baae78
Allow larger SPLIT_USB_TIMEOUT with default SPLIT_USB_TIMEOUT_POLL (#17272)
* Switch SPLIT_USB_DETECT loop to uint16_t

* Add assertion
2022-06-01 00:10:05 +01:00
Stefan Kerkmann
7712a286dc
[Core] Use a mutex guard for split shared memory (#16647) 2022-04-19 20:56:16 +10:00
Nick Brassel
2f6751e48a
Asymmetric encoders, encoder tests. (#16068) 2022-03-08 16:58:05 +11:00
QMK Bot
63646e8906
Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
Stefan Kerkmann
be59e8af2b
Deprecate split transactions status field (#16023) 2022-01-26 21:13:27 -08:00
Dasky
7b31fc54df
Enable a default task throttle for split pointing. (#15925) 2022-01-26 19:24:29 +00:00
QMK Bot
5fcdff9935
Format code according to conventions (#15693) 2021-12-31 23:46:23 +00:00
Dasky
4fe6f3cd7a
Fix split pointing for analog joystick (#15691)
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-12-31 15:38:23 -08:00
Drashna Jaelre
c86baf3ece
[Core] Fix bug and code regression for Split Common (#15603) 2021-12-28 10:01:51 +11:00
Dasky
7f7364c559
[Core] Split support for pointing devices. (#15304)
* Draft implementation

* formatting

* fix combined buttons

* remove pimoroni throttle

* sync pointing on a throttle loop with checksum

* no longer used

* doh

Co-authored-by: Drashna Jaelre <drashna@live.com>

* switch pimoroni to a cpi equivalent

* add cpi support

* allow user modification of seperate mouse reports

* a little tidy up

* add *_RIGHT defines.

* docs

* doxygen comments

* basic changelog

* clean up pimoroni

* small doc fixes

* Update docs/feature_pointing_device.md

Co-authored-by: Drashna Jaelre <drashna@live.com>

* performance tweak if side has usb

* Don't run init funtions on wrong side

* renamed some variables for consistency

* fix pimoroni typos

* Clamp instead of OR

* Promote combined values to uint16_t

* Update pointing_device.c

Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-12-27 12:05:51 +11:00
Drashna Jaelre
4d0dd1eab7
[Bug] Revert Assymmetrical Split Encoder support (#12090) (#15311)
* Revert "fix broken macro in transport.h (#15239)"

This reverts commit 06f18e22d9.

* Revert "Rework encoders to enable asymmetric split keyboards (#12090)"

This reverts commit 32215d5bff.
2021-11-27 14:40:09 +11:00
Balz Guenat
06f18e22d9
fix broken macro in transport.h (#15239) 2021-11-20 20:09:21 +00:00
Balz Guenat
32215d5bff
Rework encoders to enable asymmetric split keyboards (#12090)
Co-authored-by: Balz Guenat <balz.guenat@siemens.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-11-20 09:06:08 -08:00
Joel Challis
92385e30cd
Manually format develop (#15003) 2021-11-01 19:18:33 +00:00
Xelus22
4e1c5887c5
[Core] Refactor OLED to allow easy addition of other types (#13454)
* add docs

* core changes

* update keyboards to new OLED

* updated users to new OLED

* update layouts to new OLED

* fixup docs

* drashna's suggestion

* fix up docs

* new keyboards with oled

* core split changes

* remaining keyboard files

* Fix The Helix keyboards oled options

* reflect develop

Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: mtei <2170248+mtei@users.noreply.github.com>
2021-08-24 16:28:26 +10:00
Joakim Tufvegren
0ae20e7457
Make solo half of split keyboards (more) usable. (#13523)
* Make solo half of split keyboards (more) usable.

Using only one half of a split keyboard (that's using the split_common
framework to communicate) is not a great experience, since several read
timeouts per scan cycle cause an unusably slow scan rate.

This change blocks all split communication attempts for 500 ms
(configurable) after an error occurs, causing the scan rate to become at
least _more_ usable, but might need some tweaking to work fully on most
keyboards. One read timeout still needs to occur after the 500 ms has
passed, and if that timeout isn't low enough, some scan cycles may still
be too slow.

* Fix lint complaint.

* Require 25 consecutive comm errors to see comms as disconnected.

The number of max errors can be overridden by defining
`SPLIT_MAX_CONNECTION_ERRORS`.

* Add comments to new defines, and ability to disable disconnection check.

Also increase `SPLIT_MAX_CONNECTION_ERRORS` to 40, since it's divisible
by most relevant numbers for the description.

* Make lint happy ...again

* Only update `connection_check_timer` when needed.

* Add new defines to split keyboard documentation.

* Move connection timeout logic to transport.c, add `is_transport_connected`.

* Use split_common disconnection logic in matrix.c.

Instead of doing more or less the same thing twice.

* Move disconnection logic to `transport_master`.

Is a cleaner implementation, and causes the scan rate while disconnected
to increase instead of decrease.

* Lint fixes.

* Lower default `SERIAL_USART_TIMEOUT` to 20 ms.

The read timeout must be low enough to not cause exessively long scan
cycles when using a solo split half. 10 ms was determined from testing
to work fine even with the slowest defined baudrate of 19200 (5 ms was
too low for that case), so 20 ms should be fine for most cases.

* Remove `SERIAL_USART_TIMEOUT` from ergodox_infinity/config.h

Was somewhat mistakenly included in an earlier PR.

* Fix building with `USE_I2C`.

* Reduce built firmware size.

Not really sure why this works, the idea was taken from tzarc's work on
split disconnection.

* Tweak and improve opt-out for split disconnection logic.

There are now two ways to opt out from this feature:
* Set `SPLIT_MAX_CONNECTION_ERRORS` to 0. This will completely disable
  the connection status checks (also affects the slave matrix reset logic in
  matrix.c, though).
* Set `SPLIT_CONNECTION_CHECK_TIMEOUT` to 0. This will only disable the
  communication throttling while disconnected. Will make the firmware
  smaller.

* Make split disconnection logic work with custom transports.

Includes a fallback implementation for keyboards using a custom
split_util.c but not a custom matrix.c (currently no such keyboard seems
to be merged, though).

* Remove unnecessary include of timer.h

Co-authored-by: Joel Challis <git@zvecr.com>

Co-authored-by: Joel Challis <git@zvecr.com>
2021-08-22 10:51:17 +10:00
Drashna Jaelre
f56c202fb3
Fix ifdefs for OLED split sync code (#14017) 2021-08-15 00:54:08 -07:00
Drashna Jaelre
488aaa0980
Enable sync of OLED/ST7565 display on/off state on Splits (#13542)
* Enable sync of OLED/ST7565 display on/off state on Splits

* Only send if states are not matched

Co-authored-by: Nick Brassel <nick@tzarc.org>

Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-08-15 15:39:08 +10:00
Nick Brassel
65e3760853
Fix compilation issue. (#13926) 2021-08-09 13:20:15 +10:00
Joel Challis
567da49ed0
Avoid LTO conficts on arm_atsam (#13676) 2021-07-24 12:13:06 +01:00
Drashna Jaelre
ccc0b23a75
Unify matrix for split common and regular matrix (#13330) 2021-07-11 14:31:35 -07:00
Jameson Thatcher
550d9253b0
Allow invert of SPLIT_HAND_PIN logic (#13433)
* added support for inverting the hand pin for split keyboards

* Added docs about SPLIT_HAND_LOW_IS_LEFT

* Update docs/feature_split_keyboard.md

bring #define for split hand pin low for left half name in line with grid pin define

Co-authored-by: Joel Challis <git@zvecr.com>

* Update quantum/split_common/split_util.c

update split hand pin low is left name to match split hand grid define

Co-authored-by: Joel Challis <git@zvecr.com>

Co-authored-by: Joel Challis <git@zvecr.com>
2021-07-05 09:06:40 +10:00
Drashna Jaelre
3ab805fc67
Add support for NO_PIN to all matrix types (#12238)
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-07-03 00:20:11 -07:00
Stefan Kerkmann
04bc74d8f5
Switch split_common to CRC subsystem (#13418) 2021-07-02 22:28:32 +01:00
Nick Brassel
172e6a7030
Extensible split data sync (#11930)
* Extensible split data sync capability through transactions.

- Split common transport has been split up between the transport layer
  and data layer.
- Split "transactions" model used, with convergence between I2C and
  serial data definitions.
- Slave matrix "generation count" is used to determine if the full slave
  matrix needs to be retrieved.
- Encoders get the same "generation count" treatment.
- All other blocks of data are synchronised when a change is detected.
- All transmissions have a globally-configurable deadline before a
  transmission is forced (`FORCED_SYNC_THROTTLE_MS`, default 100ms).
- Added atomicity for all core-synced data, preventing partial updates
- Added retries to AVR i2c_master's i2c_start, to minimise the number of
  failed transactions when interrupts are disabled on the slave due to
  atomicity checks.
- Some keyboards have had slight modifications made in order to ensure
  that they still build due to firmware size restrictions.

* Fixup LED_MATRIX compile.

* Parameterise ERROR_DISCONNECT_COUNT.
2021-06-18 09:10:06 +10:00
Nick Brassel
f287597c19
Use single memcmp to determine if matrix changed. (#13064)
* Use memcmp to determine if matrix changed.

* Firmware size issues.

* Add documentation for the lack of need of MATRIX_ROW_PINS/MATRIX_COL_PINS, when overriding low-level matrix functions.
2021-06-09 17:19:42 +10:00