Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the Mill-Max and Peel-A-Way hotswap mod #17

Merged
merged 3 commits into from
Feb 18, 2019

Conversation

unjordy
Copy link
Contributor

@unjordy unjordy commented Feb 18, 2019

No description provided.

@mattdibi mattdibi merged commit f21b801 into mattdibi:master Feb 18, 2019
striveFar pushed a commit to striveFar/redox-keyboard that referenced this pull request Jan 29, 2022
* Add delay between setting a column pin and reading out the row

Currently, the way we do matrix scans in the two halfs can give rise
to race conditions. In the loop we set a column pin and in the next
cycle we read the the row. As a result we might be reading the input
before the singals stabilize. This change adds a nop that allows a
cycle between the two operations.

In addition, this patch remove a workaround that made the local
variable volatile in an attempt to fix this.

Signed-off-by: Nikos Nikoleris <[email protected]>

* Reduce the use of global variables

Signed-off-by: Nikos Nikoleris <[email protected]>

* Eliminate the use of a second rtc

Previously the two halfs used 2 separate RTCs, the 1st configured at
8Hz and the 2nd configured at 1000Hz. There is no real reason to have
both RTCs turned on; the 1st one ticks on every 125th tick of the
2nd one. This change eliminates the use of the 1st RTC.

Signed-off-by: Nikos Nikoleris <[email protected]>

* Clean-up inactivity detection code

Signed-off-by: Nikos Nikoleris <[email protected]>

* Rename the rtc and tick handler

Now that there is only one RTC and a single tick function generalise
their renames to reflect their functions.

Signed-off-by: Nikos Nikoleris <[email protected]>

* Factor out code that handles debounce in a separate function

Signed-off-by: Nikos Nikoleris <[email protected]>

* Refactor to simplify debouncing code

Signed-off-by: Nikos Nikoleris <[email protected]>

* Eliminate the maintainance function

Previously the maintainance function would make sure that continuous
key presses send multiple updates to the receiver. This is not
necessary as the debounce logic will achieve the same thing. Every
DEBOUNCE ticks where the row values have been stable, the keyboard half
sends it to the receiver.

Signed-off-by: Nikos Nikoleris <[email protected]>

* Simplify the send process and further reduce global variables

Signed-off-by: Nikos Nikoleris <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants