keybrd library is an open source library for creating custom-keyboard firmware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

tutorial_10_writing_your_own_port_classes.md 1.5KB

12345678910111213141516171819
  1. Tutorial 10 - writing your own port classes
  2. ===========================================
  3. Port classes are the keybrd library's interface to I/O expander ports.
  4. To write your own port classes:
  5. 1. Get a copy of the controller or I/O expander datasheet.
  6. 2. Study other keybrd Port classes.
  7. For example, the keybrd_DH library use these keybrd classes for its PCA9655E I/O:
  8. * PortWrite_PCA9655E
  9. * PortRead_PCA9655E
  10. * LED_PCA9655E
  11. Debugging I/O expander code is hard because SPI or I2C protocol adds a level of indirection.
  12. If you haven't written Arduino code for an I/O expander before, learn from an Arduiono I/O expander tutorial before attempting it here.
  13. <br>
  14. <a rel="license" href="https://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by/4.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">keybrd tutorial</span> by <a xmlns:cc="https://creativecommons.org/ns" href="https://github.com/wolfv6/keybrd" property="cc:attributionName" rel="cc:attributionURL">Wolfram Volpi</a> is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.<br />Permissions beyond the scope of this license may be available at <a xmlns:cc="https://creativecommons.org/ns" href="https://github.com/wolfv6/keybrd/issues/new" rel="cc:morePermissions">https://github.com/wolfv6/keybrd/issues/new</a>.