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

Write firmware for the Ferris keyboard #9634

Merged
merged 18 commits into from
Jul 18, 2020
Merged

Conversation

pierrechevalier83
Copy link
Contributor

@pierrechevalier83 pierrechevalier83 commented Jul 3, 2020

Add firmware for the Ferris keyboard (https://github.com/pierrechevalier83/ferris/)

Description

The ferris is an ergonomic split 34 key keyboard named and decorated after the rustlang mascot.
It has an onboard atmega32u4 microcontroller on the left hand side and an io expander (mcp23017)
on the right hand side.
front
back

There has been one prototype round with 5 samples so far, which is why I am
adding the keyboard to "handwired" for now rather than the top level directory.
That may move in the future if and when more are produced and sold.

Took inspiration from the gergoplex and the ergodox_ez firmware for the
split matrix with io_expander on the right hand.
Cleaned up a lot of bit fiddling on the mcu side by taking inspiration
from the split_custom in quantum.
Still bit fiddling on the mcp side as it is particularly natural to do
so with the abstractions provided by the i2c protocol. Would be good to
clean that up and abstract away the wiring from the generic i2c code in
a similar fashion as quantum and the mcp side behave.

One improvement over the ergodox_ez and the gergoplex firmwares is that
the wiring is straight forward as opposed to swapping rows and columns
in two different places that end up cancelling out for some reason.

I have flashed this firmware to a board and used it for over a day with no issues.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Took inspiration from the gergoplex and the ergodox_ez firmware for the
split matrix with io_expander on the right hand.
Cleaned up a lot of bit fiddling on the mcu side by taking inspiration
from the `split_custom` in quantum.
Still bit fiddling on the mcp side as it is particularly natural to do
so with the abstractions provided by the i2c protocol. Would be good to
clean that up and abstract away the wiring from the generic i2c code in
a similar fashion as quantum and the mcp side behave.

One improvement over the ergodox_ez and the gergoplex firmwares is that
the wiring is straight forward as opposed to swapping rows and columns
in two different places that end up cancelling out for some reason.

At this stage, I have flashed this firmware to a board and have verified
that all keys are behaving as intended by shorting pins.
I still have to solder in some switches and test that everything works
correctly at normal typing speeds, but I don't expect any major issues
given I'm building up on previous effort, including the debouncing code
from the ergodox_ez.
@tzarc tzarc requested a review from a team July 14, 2020 01:11
@tzarc tzarc added the keyboard label Jul 14, 2020
keyboards/handwired/ferris/config.h Outdated Show resolved Hide resolved
keyboards/handwired/ferris/matrix.c Show resolved Hide resolved
@tzarc tzarc requested a review from a team July 14, 2020 01:18
keyboards/handwired/ferris/ferris.h Outdated Show resolved Hide resolved
keyboards/handwired/ferris/keymaps/default/rules.mk Outdated Show resolved Hide resolved
keyboards/handwired/ferris/rules.mk Outdated Show resolved Hide resolved
keyboards/handwired/ferris/rules.mk Outdated Show resolved Hide resolved
keyboards/handwired/ferris/info.json Outdated Show resolved Hide resolved
keyboards/handwired/ferris/info.json Outdated Show resolved Hide resolved
keyboards/handwired/ferris/rules.mk Outdated Show resolved Hide resolved
keyboards/handwired/ferris/rules.mk Outdated Show resolved Hide resolved
keyboards/handwired/ferris/ferris.h Outdated Show resolved Hide resolved
keyboards/handwired/ferris/ferris.c Outdated Show resolved Hide resolved
keyboards/handwired/ferris/matrix.c Outdated Show resolved Hide resolved
keyboards/handwired/ferris/matrix.c Outdated Show resolved Hide resolved
keyboards/handwired/ferris/matrix.c Outdated Show resolved Hide resolved
keyboards/handwired/ferris/matrix.c Outdated Show resolved Hide resolved
@pierrechevalier83
Copy link
Contributor Author

Thanks a lot for the detailed and informative review! 😄 I think I've addressed all comments now :)

Copy link
Member

@tzarc tzarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple more, now that the dust has settled somewhat. Rest looks good!

keyboards/handwired/ferris/config.h Outdated Show resolved Hide resolved
keyboards/handwired/ferris/ferris.c Outdated Show resolved Hide resolved
keyboards/handwired/ferris/keymaps/default/keymap.c Outdated Show resolved Hide resolved
keyboards/handwired/ferris/matrix.c Outdated Show resolved Hide resolved
keyboards/handwired/ferris/matrix.c Outdated Show resolved Hide resolved
@pierrechevalier83
Copy link
Contributor Author

Thanks again for the great review, @tzarc. I think the only point that remains is to decide if the opinionated settings in config.h should move to the default keymap or not.

@tzarc
Copy link
Member

tzarc commented Jul 16, 2020

Thanks again for the great review, @tzarc. I think the only point that remains is to decide if the opinionated settings in config.h should move to the default keymap or not.

Well, try making a personal keymap and attempt to override one of the values?

@pierrechevalier83
Copy link
Contributor Author

Thanks again for the great review, @tzarc. I think the only point that remains is to decide if the opinionated settings in config.h should move to the default keymap or not.

Well, try making a personal keymap and attempt to override one of the values?

Ah ok. You're saying users can't actually override it. Ok. Will move it. Thanks for saving me from myself 😁

…map config

These setting happen to be unused in the default keymap at the moment,
as it has only one layer with no homerow modifiers and no mouse key; but
I would like to keep it there for two reasons:
* It can serve as an example to people creating their own keymap
* I plan to design a more usable default keymap that uses these features
  once this PR which adds the Ferris keyboard is merged.
@tzarc tzarc requested a review from a team July 16, 2020 23:42
@tzarc
Copy link
Member

tzarc commented Jul 16, 2020

LGTM!

@pierrechevalier83
Copy link
Contributor Author

LGTM!

I know I've already said it, but this was a really great review! I learned a lot and I like the code a lot better know. Thanks so much for taking the time :)

@tzarc
Copy link
Member

tzarc commented Jul 16, 2020

LGTM!

I know I've already said it, but this was a really great review! I learned a lot and I like the code a lot better know. Thanks so much for taking the time :)

No problemo chief!

@pierrechevalier83
Copy link
Contributor Author

@fauxpark, I think I addressed all of your comments too now. Thanks for the thorough review 😀

keyboards/handwired/ferris/ferris.c Outdated Show resolved Hide resolved
keyboards/handwired/ferris/readme.md Outdated Show resolved Hide resolved
keyboards/handwired/ferris/matrix.c Show resolved Hide resolved
@pierrechevalier83
Copy link
Contributor Author

Sorry, closed it by mistake 😨

@pierrechevalier83
Copy link
Contributor Author

@fauxpark , I think that's all review comments addressed again, FYI 🦀😀

@tzarc tzarc merged commit a8c2307 into qmk:master Jul 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants