Commit Graph

41 Commits

Author SHA1 Message Date
Dave da0e89ed5e Define default row scanner in arch headers
- in header files, change ASDF_ARCH_DEFAULT_SCANNER to
ASDF_ARCH_DEFAULT_ROW_SCANNER

- remove unused ASDF_NUM_KEYMAPS definition in asdf_keymap_setup.h.in
2023-04-18 02:46:43 -05:00
Dave 1d5e76590f make sure all tests pass
- added keymap_setup() function to keymap tests

- The test string was not long enough to overflow the larger buffer.
Switched to use pseudo-random sequence intstead of a fixe test string.
2021-12-10 22:25:13 -06:00
Dave 8bb2711ccb Fix bad msec delay routine in 2560 arch module 2021-12-05 00:07:41 -06:00
Dave 66df34a972 Added arch API for msec delay. 2021-12-04 23:06:39 -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 17d5313fe9 Merge branch 'master' into newmaps 2021-11-28 15:48:03 -06:00
Dave f8a314d0ca BUGFIX: 328P OUT2 output was changing OUT1
This appears to have been a cut-paste typo in the asdf_arch_out2_set() function
in asdf_arch_atmega328p.c.  The port was set to OUT2, but the bit was OUT1.
2021-11-08 22:36:09 -06: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 3a854d97f2 Get tests to pass with CMake build system
progress on issues #23 (new mechanism to add keymaps) and #27 (Cmake build)
2021-03-05 01:17:33 -06:00
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
Dave b37f8165a4 Allow settling time for each row output change. 2020-08-06 15:22:52 -05:00
Dave 098ae72f5f atmega2560: Increase row output settling time from 2 usec to 4 usec 2020-08-06 15:18:40 -05:00
Dave 7b05b6eadb Bug fix: long delay should invoke _delay_ms(), not _delay_us(). 2020-05-23 23:28:00 -05:00
Dave b3b2a93cdb Added dummy strobe-set functions to arch_test.c,h. 2020-05-15 14:52:18 -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 3c1d050abb Move F_CPU to header file and clean up 2560 read_row() code 2020-05-12 17:09:49 -05:00
Dave 97d38282ae Cleanup read_row(), and remove duplicated Makefile 2020-05-12 14:50:56 -05:00
Dave e9630edb03 Fix atmega2560 read_row routine 2020-05-09 03:51:24 -05:00
Dave de346a1e59 Merge branch 'hooks' 2020-05-05 15:10:40 -05:00
Dave 5baf20a16b Get hook functionality running and DIP switch cleanup 2020-05-05 15:05:54 -05:00
Dave c7b8641d0d Define dipswitch row in arch-dependent module.
Because the DIP switch row is hardwired on the controller board.
2020-05-03 12:05:27 -05:00
Dave 4d8bc2a9be (Development branch) Added in code to implement fuction hooks 2020-05-01 16:39:21 -05:00
Dave 8e2a12b9d5 Initial cut of OSI 542 keyboard scan support 2020-04-27 17:10:13 -05:00
Dave e294f0164e Add architecture-dependent files for ATMega2560, adjust Makefiles 2020-04-15 09:45:07 -05:00
Dave 47bc7c586f More comment cleanups and clarifications.
Rename some variables to clarify use
2020-04-08 15:00:43 -05:00
Dave 644efa7122 Test cleanups 2020-04-08 14:23:13 -05: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 93349ed6e9 Add support for "hi-z when low" outputs
The apple 1 CLEAR input requires a high-impedance inactive state to avoid
conflict with the pin output of the 7404 at D12 (via CR4). So, to cover this
condition most generally, this patch changes the adds a Hi-Z when low physical
device for each output line, to complement the Hi-Z-when-high open collector
emulation. The nomenclature is changed from OUT*_OC (emulated open collector) to
OUT*_OPEN_HI and OUT*_OPEN_LO to indicate which condition gets the Hi-Z state.

- added the set() functions to the asdf_arch_atmega328p.[ch] files and applied
the above nomenclature.

- Added the set() functions to the asdf_physical.[ch] files and applied the
above nomenclature

- Modified the SCREEN_CLEAR device to PHYSICAL_OUT1_OPEN_LO in the apple2 and
ascii keymaps.

- Changed the RESET from PHYSICAL_OUT1_OC to PHYSICAL_OUT1_OPEN_HI in the apple2
and ascii keymaps.
2020-03-16 12:56:21 -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 73e2760d94 Add more unit tests for virtual layer
- use macros to designate which keymaps are used to setup the tests.
2020-03-11 01:50:27 -05:00
David Fenyes 23237fae88 Added unit tests for virtual outputs. 2020-03-09 05:16:52 -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 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
David Fenyes 6e462589cc Arch file support for 4-bit row address. 2020-02-19 23:32:14 -06:00
Dave 3c34734a46 I/O cleanup and SYS_RESET fix
- Break out initialization of SYS_RESET, CLEAR, STROBE, and CAPS LED into
  separate functions.

- Emulate open collector output for SYS_RESET: OFF=input with weak pullup.
  ON=output low.

- Add function to cap CAPS LED.
2019-12-28 10:22:00 -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