Commit Graph

11 Commits

Author SHA1 Message Date
Dave 97890eaf63 Apply clang-format to files 2020-05-15 14:48:40 -05:00
Dave ef7a7bf320 Clean up shift/shiftlock cruft
* firmware/asdf/src/asdf_modifiers.h: C
2020-04-27 17:11:36 -05:00
Dave 47bc7c586f More comment cleanups and clarifications.
Rename some variables to clarify use
2020-04-08 15:00:43 -05:00
Dave ed761974e6 Modifiers cleanup
- asdf_modifiers.[ch]: Replace asdf_modifier_shiftlock_activate() with
  asdf_modifier_shiftlock_on_activate() and
  asdf_modifier_shiftlock_toggle_activate().  Instead of a configurateion
  setting for shiftlock state to switch between SHIFTLOCK locks on, SHIFT turns
  off, vs SHIFTLOCK toggles, and SHIFT turns off, create two different
  SHIFTLOCK functions, one for each behavior, and allow the keymap to bind the
  desired function.

- asdf.h: replace ACTION_SHIFTLOCK with ACTION_SHIFTLOCK_ON and
  ACTION_SHIFTLOCK_TOGGLE.

- asdf.h: move start of ACTION codes from 0x80 to 0x90, since SOL-20 uses codes
  from 0x80-0x8f.

- asdf.c: test for ACTION code using (code > ASDF_ACTION) instead of (code &
  ASDF_ACTION), since ASDF_ACTION need not be a power of 2.

- asdf_modifiers.[ch] and other files: remove
  asdf_modifiers_shiftlock_deactivate() and
  asdf_modifiers_capslock_deactivate(), and any references to these functions
  since they are null functions anyway.
2020-03-14 00:11:29 -05:00
David Fenyes 01008af937 Break out physical resource functions into asdf_physical.[ch]
- Split asdf_virtual.c into asdf_physical.c and asdf_virtual.c, moving the
functions that handle the physical resources to asdf_physical.c

- cleaned up nomenclature to be more consistent and less confusing.

- fixed keymap files and tests to use asdf_physical.c/h and new nomenclature.

- added asdf_physical.c to Makefiles.
2020-03-12 00:45:59 -05:00
David Fenyes 1b388bc591 Add virtual output device module (compiles without warning)
* Created test fixture for virtual outputs

* Added virtual output configuration to keymap definitions removed special
actions_send_reset() and actions_send_screenclear() functions, and replaced with
virtual output definitions.

* asdf_actions.c is removed from build.

* asdf_arch_atmega328p.c: added functions to set/clear each real output

* asdf_arch_atmega328p.c: added pulse_delay() function

* asdf_arch_test.c: added mock machinery to emulate outputs, test output
settings, and detect properly and improperly-formed pulses on the outputs.

* asdf_keymaps.c: allocate initialzer array. asdf_keymaps_select_keymap() calls
asdf_virtual_init() with initializer list for the keymap to set up the LEDS and
outputs every time a new keymap is selected.
2020-03-08 14:45:40 -05:00
David Fenyes 44a49afdae modify the SHIFTLOCK and CAPSLOCK led functions to use virtual LEDs 2020-03-06 13:46:27 -06:00
David Fenyes a598eaaee1 Add support for LEDs
- asdf_modifier.c: refactor CAPS LOCK setting and add LED setting
- asdf_arch_atmega328p.[ch]: add in LED definitions and functions
- add dummy asdf_arch_caps_led() function to arch files so test can compile.
2020-02-20 16:48:17 -06:00
Dave 088af21650 modifier cleanups
- add caps key function, similar to shift.  This is intended for a DIP switch
  setting to switch the keyboard between all CAPS and upper/lower modes.
- clean up the modifier state enums to include all legal values
- clean up the modifier index value calculation to improve readability.
2019-12-24 22:27:24 -06:00
Dave 6b78fe9111 Change "Universal" to more accurate "Unified" 2019-12-15 02:09:15 -06:00
Dave 784805adc7 first commit 2019-12-12 14:46:29 -06:00