Commit Graph

6 Commits

Author SHA1 Message Date
Dave b688f1c56f Get virtual devices in new maps scheme to pass tests
Remove initialization from data structure.

Replace the previous virtual_init() with a virtual_init() that initializes the
data structures to a default state

Create virtual_sync() function to push the state of virtual devices to the
physical outputs.  Moved from the previous virtual_init() function.

The virtual device table is now built by direct calls to virtual_add() from the
setup function.

Toward issue [#23]
2021-03-05 01:00:39 -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
David Fenyes dae4b8d322 Replaced the Virtual out pulse function with long and short pulse
- Replace V_PULSE with V_PULSE_LONG and V_PULSE_SHORT functions.

- replace the asdf_arch_pulse_delay() with asdf_arch_pulse_delay_short() and
asdf_arch_pulse_delay_long() functions.

- modify keymaps to use long and short pulses.

- long pulse is 50 ms.  Short pulse is 10 us.

- Added localizing prefix to keymap definitions to avoid conflicts.
2020-03-17 01:42:51 -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