Commit Graph

29 Commits

Author SHA1 Message Date
David Fenyes 27f2616d22 Remove extraneous include 2022-12-27 15:30:57 -06:00
Dave 7ce550257c Breakout keyboard init
factor out common code and add back wrappers, so keyboard initializes to
default keyboard on power up, and afterwards, won't reinitialize the
keyboard unless the map changes.
2021-12-04 23:12:32 -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 07ff09720b Fix library-related indirection bug
Accessing library functions via function pointer seems to cause a reset.
Still investigating the cause.

- compile keymaps subdir as part of main src cmakefile, rather than as a
separate library.

- rather than setup table of function pointers and using an indirection
in the main code, set up a jump table (switch).  This is cleaner.
2021-11-28 15:28:03 -06:00
Dave f70a6006e1 Remove redundant reset code
keymaps_init calls select, which sets the index to 0 and resets the
keymaps.
2021-11-27 23:19:16 -06:00
Dave ebe9344c82 Clean up keymap init routine
- replace asdf_keymaps_clear() with asdf_keymaps_reset() which does the
  clear, and also resets hooks and virtual devices for the keymap
2021-09-21 21:02:37 -05:00
Dave 63805800af firmware now compiles without errors
test suite passes
have not yet tested firmware
2021-05-19 13:32:23 -05:00
Dave 8310259cc7 Progress toward building new keymap scheme with cmake
- keymap files (c,h) are in src/Keymaps
- keymap files are added to the keymap library in src/Keymaps/CMakeLists.txt
- keymaps for the build are listed, along with positions, in /keymap_lists.cmake
- cmake generates a keymap jump table from the keymap lib and list
- tests mostly passing.  Keymap structure for testing will be used as the model
  for the app keymaps.
2021-03-07 20:38:40 -06:00
Dave bcde21f3a8 Get keymap tests to pass (issues [#23] and [#25])
Clean compile of asdf_keymaps.c/h and tests

Clean up keymap pointer notation

Reduce number of keymaps to 16, matching number of DIP switches allocated for
keymap selection.
2021-03-05 01:00:19 -06: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
David Fenyes daa6ff672f WIP - non-compiling keymap updates
Please see ARCHITECTURE-keymaps.org for general idea and TODO list.
2021-03-05 00:59:46 -06:00
David Fenyes 99610395fc Get new keymap scheme to pass keymap tests
Toward issue #23
2021-03-05 00:59:40 -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 11fd44c0cb BUGFIX: repeat apparatus not initiazized on keymap switch.
Added call to asdf_repeat_init() form asdf_keymaps_select_keymap()
2020-07-20 14:13:53 -05:00
Dave 97890eaf63 Apply clang-format to files 2020-05-15 14:48:40 -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 47bc7c586f More comment cleanups and clarifications.
Rename some variables to clarify use
2020-04-08 15:00:43 -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
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 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 cff7f6052a Changes for virtual LED and output mapping.
Rough first cut, have not yet tried to compile or test.
2020-03-06 13:24:03 -06: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
David Fenyes 97cda49e31 Modifications for multiple keymap support.
- Added C preprocessor macros to determine largest key matrix, so enough space
  may be allocated

- Cleaned up keymap definition macros for readability

- Created master keymap file to aggregate individual keymaps

- Modified make files to copy the specified master keymap
  to asdf_keymap_defs.h during build.

- Added template keymap file.
2020-02-19 23:22:23 -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 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