Commit Graph

25 Commits

Author SHA1 Message Date
Dave
3f2e8aa249 Add hook for keyscan routine
A new hook was added, ASDF_HOOK_KEY_SCANNER.  This allows the entire keyscan routine
to be specified for each keymap.
2023-04-17 11:51:08 -05:00
Dave
116455ea61 Added ability to set the output rate for messages
A delay after each output character can be set, so slow interpreters,
etc. will not miss characters on systems with no handshaking.
2021-12-04 23:08:44 -06:00
Dave
45329de193 Fix slow repeat on some columns (Fixes #15)
Removed a bit of logic from the column bit test code that created
different scan rates for different columns.
2021-12-04 11:32:38 -06:00
Dave
562b859540 Add apple 2 caps, printing, bug fixes
- Added the apple 2 CAPS map

- auto-generate a function to check validity of a keymap index

- Added buffered message printing. This is different from keycode
buffering, since an extra delay is added for each message character to
allow polling hosts to keep up. Keycodes are generated at human speeds
and need no further slowdown.

- Added a message character delay to the arch-* modules

- enlarged the buffer pool, and created a buffer for messages

- bumped version number
2021-11-29 16:26:08 -06:00
Dave
836d0c4a4f Initialze buffers before other subsystems
Other subsystems may want to use buffers for output, e.g., for status
and debug.
2021-11-27 23:16:51 -06:00
Dave
fc22f5be53 Fixed comment 2021-09-21 20:59:00 -05:00
Dave
14ad7c4cc2 More keymap updates toward [#23] amd [#25]
App code now compiles clean, but test code still needs to be updated to set up
the test keymaps.  So, no passing tests yet.
2021-11-30 13:11:48 -06:00
Dave
d6edb15734 Rebase newmaps branch to master
(WARNING: WIP) Gathered Work-in-progress on alternate keymap defs

Exploratory branch.  Code is messy and untested.
Examining creating a module for each keymap rather than header file.
2021-03-05 00:58:06 -06:00
Dave
2a02f74171 Notation fixes for pointers to functions 2020-08-06 15:17:28 -05:00
Dave
25d0693eda minor hook cleanups
- Rename asdf_hook_do() to asdf_hook_execute()
- asdf.c: Call asdf_hook_execute() for ASDF_HOOK_EACH_SCAN hook call in the scan
  routine, instead of getting then calling the function via hook_get()
- asdf.c: move the fetch of scan function hook outside the scan loop.
2020-05-19 17:58:58 -05:00
Dave
7801a17f56 Add DIP switch select for strobe polarity and autorepeat
- arch-* files: replace private arch_strobe_init() function with public
arch_set_neg_strobe() and arch_set_pos_strobe() functions

- asdf.c,h: add ACTION hooks to set strobe polarity and enable/disable
autorepeat

- break out DIP switch definitions into a separate header file, included by each
keymap.  This ensures consistent DIP switch behavior across keymaps.
2020-05-15 14:42:06 -05:00
Dave
5baf20a16b Get hook functionality running and DIP switch cleanup 2020-05-05 15:05:54 -05:00
Dave
4d8bc2a9be (Development branch) Added in code to implement fuction hooks 2020-05-01 16:39:21 -05:00
Dave
30cd305fe6 Fix and clarify comments, add COPYING file 2020-04-08 12:41:53 -05:00
David Fenyes
e37da4e969 Reset modifier states when keymap is reset
- asdf.c: remove asdf_modifiers_init() from asdf_init().
- asdf_keymaps.c: add a call do asdf_modifiers_init()
  to asdf_keymaps_select_keymap()
2020-03-21 14:26:57 -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
8740ab3262 Comment and nomenclature cleanups
- fix and clarify various function header comments
- use consistent nomenclature for virtual layer.
2020-03-12 23:56:09 -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
5a6a64dd55 Remove #include "asdf_actions.h" from asdf.c 2020-03-08 15:08:10 -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
16dc913f74 Added functions to change keymaps
- asdf_keymaps_select_keymap() function to select a keymap
- asdf_keymaps_select_n_{set|clear} functions to set a bit in keymap number,
  to support dip switches.
2020-02-19 23:28:14 -06:00
Dave
f0772180cb Break out keymap definitions
- Separate the "asdf_keymaps.h" files into
-- "asdf_keymaps.h" which is not keymap dependent and contains keymap function
   prototypes
-- "asdf_keymap_defs.h" which contains the keymap definitions
-- Move definitions of number of rows and columns from asdf.h to keymaps_defs.h.
-- keymap_defs.h is copied from the keymaps directory depending on which keymap
   is specified in the Makefile.
-- Makefile fixes for the above changes
-- Fix includes in several files to reflect the above changes.
2019-12-24 21:54:35 -06:00
Dave
a03473769f Added screen clear and reset functions
- added asdf_actions.c, asdf_actions.h to place misc. key actions
- asdf.c: asdf_activate_action(): added actions for screen clear and reset
- asdf_config.h, Arch/asdf_arch_atmega328p.c: added defs to specify polarity of data,
  strobe, SCREEN_CLEAR and reset outputs.
- Arch/asdf_arch_atmega328p.h: fixed pin definitions for RESET and SCREEN_CLEAR
2019-12-15 02:38:04 -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