├── .github └── workflows │ └── asdf-firmware.yml ├── .gitignore ├── README.md ├── firmware └── asdf │ ├── CMakeLists.txt │ ├── Pipfile │ ├── README.md │ ├── cmake │ └── generic-gcc-avr.cmake │ ├── docs │ ├── Makefile │ ├── make.bat │ └── source │ │ ├── _templates │ │ ├── hexfile_link.in │ │ └── index.rst.in │ │ └── conf.py │ ├── eeprom-spec.org │ ├── keymap_list.cmake │ ├── make-targets.sh │ ├── src │ ├── ARCHITECTURE-keymaps.org │ ├── Arch │ │ ├── asdf_arch_atmega2560.c │ │ ├── asdf_arch_atmega2560.h │ │ ├── asdf_arch_atmega328p.c │ │ ├── asdf_arch_atmega328p.h │ │ ├── asdf_arch_test.c │ │ └── asdf_arch_test.h │ ├── CMakeLists.txt │ ├── COPYING │ ├── Keymaps │ │ ├── _clang-format │ │ ├── asdf_keymap_ace1000.c │ │ ├── asdf_keymap_ace1000.h │ │ ├── asdf_keymap_ace1000_add_map.c │ │ ├── asdf_keymap_ace1000_add_map.h │ │ ├── asdf_keymap_apple2.c │ │ ├── asdf_keymap_apple2.h │ │ ├── asdf_keymap_apple2_add_map.c │ │ ├── asdf_keymap_apple2_add_map.h │ │ ├── asdf_keymap_apple2_caps.c │ │ ├── asdf_keymap_apple2_caps.h │ │ ├── asdf_keymap_apple2_matrix.c │ │ ├── asdf_keymap_classic.c │ │ ├── asdf_keymap_classic.h │ │ ├── asdf_keymap_classic_add_map.c │ │ ├── asdf_keymap_classic_add_map.h │ │ ├── asdf_keymap_classic_caps.c │ │ ├── asdf_keymap_defs_apple2.h │ │ ├── asdf_keymap_defs_dipswitch.h │ │ ├── asdf_keymap_defs_sol.h │ │ ├── asdf_keymap_defs_test.h │ │ ├── asdf_keymap_defs_test2.h │ │ ├── asdf_keymap_sol.c │ │ └── asdf_keymap_sol.h │ ├── Templates │ │ ├── function.c │ │ ├── template.c │ │ └── template.h │ ├── _clang-format │ ├── asdf.c │ ├── asdf.h │ ├── asdf_ascii.h │ ├── asdf_buffer.c │ ├── asdf_buffer.h │ ├── asdf_config.h │ ├── asdf_hook.c │ ├── asdf_hook.h │ ├── asdf_keymap_setup.c.in │ ├── asdf_keymap_setup.h.in │ ├── asdf_keymaps.c │ ├── asdf_keymaps.h │ ├── asdf_modifiers.c │ ├── asdf_modifiers.h │ ├── asdf_physical.c │ ├── asdf_physical.h │ ├── asdf_print.c │ ├── asdf_print.h │ ├── asdf_repeat.c │ ├── asdf_repeat.h │ ├── asdf_virtual.c │ ├── asdf_virtual.h │ └── main.c │ └── test │ ├── CmakeLists.txt │ ├── _clang-format │ ├── asdf_keymap_setup.c │ ├── asdf_keymap_setup.h │ ├── asdf_keymap_table.c │ ├── asdf_keymap_table.h │ ├── test_asdf.c │ ├── test_asdf_buffer.c │ ├── test_asdf_hook.c │ ├── test_asdf_keymap_defs.c │ ├── test_asdf_keymap_defs.h │ ├── test_asdf_keymaps.c │ ├── test_asdf_keyslib.c │ ├── test_asdf_keyslib.h │ ├── test_asdf_lib.c │ ├── test_asdf_lib.h │ ├── test_asdf_modifiers.c │ ├── test_asdf_repeat.c │ ├── test_asdf_virtual.c │ ├── test_keymapdefs.c │ ├── test_keymapdefs.h │ ├── test_keypress_lib.c │ └── unity │ ├── auto │ ├── colour_prompt.rb │ ├── colour_reporter.rb │ ├── generate_config.yml │ ├── generate_module.rb │ ├── generate_test_runner.rb │ ├── parse_output.rb │ ├── stylize_as_junit.rb │ ├── test_file_filter.rb │ ├── type_sanitizer.rb │ ├── unity_test_summary.py │ ├── unity_test_summary.rb │ └── unity_to_junit.py │ ├── unity.c │ ├── unity.h │ └── unity_internals.h └── hardware ├── apple2-encoder ├── README.md ├── apple-encoder-bom.xlsx ├── apple-encoder.kicad_pcb ├── apple-encoder.pro ├── apple-encoder.sch └── images │ └── PCB-assembly-rendering.png ├── common ├── 3d │ └── cherry_mx.wrl ├── mounting-hardware.kicad_sym ├── unikbd.dcm ├── unikbd.kicad_sym ├── unikbd.lib └── unikbd.pretty │ ├── DIP-16_W7.62mm_Proto.kicad_mod │ ├── D_DO-35_SOD27_P7.62mm_Horizontal_bypassed.kicad_mod │ ├── ExpansionHeader_1x25_P2.54.kicad_mod │ ├── Futaba-MD-4PCS-LED-aligner.kicad_mod │ ├── Futaba-MD-4PCS-aligner.kicad_mod │ ├── Futaba-MD-4PCS-aligner_tool.kicad_mod │ ├── Futaba_2u_Cherry_aligner.kicad_mod │ ├── Futaba_space_Cherry_aligner.kicad_mod │ ├── Key_MX.kicad_mod │ ├── Key_MX_2u.kicad_mod │ ├── Key_MX_Aligner.kicad_mod │ ├── Key_MX_Aligner_tool.kicad_mod │ ├── Key_MX_DIY.kicad_mod │ ├── Key_MX_LED.kicad_mod │ ├── Key_MX_Spacebar_5.25.kicad_mod │ ├── MX_2u_aligner.kicad_mod │ ├── MX_space_align.mod │ ├── MX_space_aligner.kicad_mod │ ├── MountingHole_3.5mm.kicad_mod │ ├── OSI mounting holes.kicad_mod │ ├── OSI_spacer_holes.kicad_mod │ ├── SOL20-header-vertical.kicad_mod │ ├── SW_DIP_SPSTx08_oriented_backward.kicad_mod │ ├── SW_DIP_SPSTx08_oriented_forward.kicad_mod │ ├── TIL311.kicad_mod │ ├── bend-guide-8u.kicad_mod │ ├── diode-combined-DIY.kicad_mod │ ├── diode-combined.kicad_mod │ ├── futaba-post.kicad_mod │ ├── kbd_header_and_mounting_holes.kicad_mod │ ├── kbd_header_two_mounting_holes.kicad_mod │ ├── kbd_mounting_holes_only.kicad_mod │ └── proto_pad.kicad_mod ├── documents ├── Keyboard_build.html ├── Keyboard_build.md ├── Photo Jul 10, 12 20 41 PM.jpg ├── build-images │ ├── All_TH_parts_installed.jpg │ ├── Connector_on_back.jpg │ ├── Install_Diodes.jpg │ ├── Install_resistors.jpg │ ├── Install_switches.jpg │ ├── Tape Diodes_in_place.jpg │ ├── Tape_parts_in_place.jpg │ ├── Tape_to_table.jpg │ ├── bend_leads.jpg │ ├── cutting_post.jpg │ ├── filed_futaba_posts.jpg │ ├── futaba_aligner.jpg │ ├── futaba_posts_before_and_after.jpg │ ├── futaba_posts_before_filing.jpg │ ├── futaba_posts_breakaway_filed_off.jpg │ ├── futaba_posts_installed_on_spacebar.jpg │ ├── futaba_posts_press_into_spacebar.jpg │ ├── installing_futaba_spacebar_stabilizer_rod.jpg │ ├── pcb_mount_stabilizers.jpg │ ├── posts_removed.jpg │ ├── pre-breakaway.jpg │ ├── rod_estimating_second_bend.jpg │ ├── rod_first_bend.jpg │ ├── rod_insert_first_arm.jpg │ ├── solder_switches.jpg │ ├── stabilizer_installed_futaba.jpg │ ├── stabilizer_rod_stock.jpg │ ├── stabilizer_rod_timmed_arms.jpg │ └── test_fit_too_long.jpg └── solder_switches.jpg ├── franklin-ace-1000-keyboard ├── LICENSE ├── README.md └── images │ ├── 2023-03-18 10.09.14.jpg │ ├── 2023-03-18 10.15.01.jpg │ ├── 2023-03-18 10.15.10.jpg │ ├── 2023-03-18 10.16.16.jpg │ └── 2023-03-18 10.19.41.jpg ├── interface-ascii-atmega2560 ├── README.md ├── images │ └── PCB-assembly-rendering.png ├── interface-ascii-2560.kicad_pcb ├── interface-ascii-2560.pro └── interface-ascii-2560.sch ├── interface-ascii ├── README.md ├── bom.ini ├── images │ └── PCB-assembly-rendering.png ├── interface-ascii-bom.xlsx ├── interface-ascii.kicad_pcb ├── interface-ascii.pro ├── interface-ascii.sch └── production-package │ ├── Makefile │ ├── PCB_dir │ └── Makefile │ ├── interface-ascii-Rev_3.0.0-Production-package.zip │ ├── programming_files_dir │ └── README.rst │ └── templates_dir │ └── bom.ini ├── interface-osi ├── README.md ├── Sound.kicad_sch ├── Sound.sch ├── addon.kicad-pcb.pro ├── addon.kicad_pcb ├── addon.kicad_sch ├── addon.pro ├── addon.sch ├── images │ └── pcb-render.png ├── interface-osi.kicad_pcb ├── interface-osi.kicad_pro ├── interface-osi.kicad_sch ├── interface-osi.pro ├── interface-osi.sch ├── special_keys.kicad_sch └── special_keys.sch ├── keyboard-classic ├── Aligner-cherry │ ├── aligner-cherry.kicad_pcb │ └── aligner-cherry.pro ├── Aligner-futaba │ ├── aligner-futaba.kicad_pcb │ └── aligner-futaba.pro ├── classic-ascii-keycaps.xlsx ├── kbd-classic.kicad_pcb ├── kbd-classic.kicad_pro ├── kbd-classic.kicad_sch ├── kbd-classic.pro ├── kbd-classic.sch ├── keys1.kicad_sch ├── keys1.sch ├── keys2.kicad_sch └── keys2.sch ├── keyboard-franklin-ace-1000 ├── franklin-ace-1000-aligner-cherry │ ├── franklin-ace-1000-aligner-cherry.kicad_pcb │ └── franklin-ace-1000-aligner-cherry.kicad_pro ├── franklin-ace-1000-aligner-futaba │ ├── franklin-ace-1000-aligner-futaba.Kicad_pro │ └── franklin-ace-1000-aligner-futaba.kicad_pcb ├── franklin-ace-1000-keyboard.kicad_pcb ├── franklin-ace-1000-keyboard.kicad_pro ├── franklin-ace-1000-keyboard.kicad_sch └── readme.md ├── keyboard-knight ├── README.md ├── knight-keycaps.xlsx └── sail-keycaps.xlsx ├── keyboard-sol-integrated ├── README.md ├── encoder-smt.sch ├── images │ ├── kbd_fit.jpg │ ├── sol-integrated-pcb.png │ └── sol_20_kbd.jpg ├── kbd-sol-2_0-bom.csv ├── kbd-sol.kicad_pcb ├── kbd-sol.pro ├── kbd-sol.sch ├── keys1.sch ├── keys2.sch └── keys3.sch ├── keyboard-sol ├── README.md ├── aligner-cherry │ ├── aligner-cherry.kicad_pcb │ ├── aligner-cherry.pro │ └── fp-lib-table ├── aligner-futaba │ ├── aligner-futaba.kicad_pcb │ └── aligner-futaba.pro ├── images │ ├── kbd_fit.jpg │ └── sol_20_kbd.jpg ├── kbd-sol.kicad_pcb ├── kbd-sol.pro ├── kbd-sol.sch ├── keys1.sch ├── keys2.sch ├── keys3.sch └── sol-20-keycaps.xlsx └── multi-kbd-adapter ├── README.md ├── images └── multi-adapter.png ├── multi-adapter.kicad_pcb ├── multi-adapter.pro └── multi-adapter.sch /.github/workflows/asdf-firmware.yml: -------------------------------------------------------------------------------- 1 | name: asdf-firmware 2 | on: 3 | push: 4 | branches: 5 | - asdf-release 6 | - asdf-build-test 7 | 8 | jobs: 9 | build_firmware: 10 | runs-on: ubuntu-latest 11 | container: { image: alpine } 12 | defaults: 13 | run: 14 | shell: sh 15 | steps: 16 | - name: install_git_and_bash 17 | run: apk add bash git rsync 18 | 19 | - name: checkout 20 | uses: actions/checkout@v2 21 | 22 | - run: apk add gcc-avr binutils-avr avr-libc 23 | - run: apk add cmake make 24 | - run: apk add python3 py3-pip 25 | - run: pip install -U sphinx sphinx-rtd-theme sphinx-autodoc-typehints 26 | - run: pip install -U sphinxcontrib-napoleon 27 | - run: pip install -U toml 28 | # - run: pip install pipenv 29 | 30 | # Create the build directories, make all targets, and copy 31 | # hex files to sphinx source directory for download links 32 | - run: cd firmware/asdf; /bin/bash ./make-targets.sh -a -i -s 33 | - run: mkdir public; touch public/.nojekyll 34 | - run: sphinx-build -b html firmware/asdf/docs/source public 35 | 36 | - name: Deploy 37 | uses: JamesIves/github-pages-deploy-action@v4 38 | with: 39 | folder: public 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #MacOS related 2 | .DS_Store 3 | 4 | #KiCAD related 5 | *.bak 6 | *.bck 7 | *.sch-bak 8 | *.dcm 9 | *-cache.lib 10 | *.kicad_pcb-bak 11 | fp-lib-table 12 | fp-info-cache 13 | *-rescue.lib 14 | 15 | #C related 16 | *.o 17 | *.elf 18 | *.map 19 | 20 | #misc 21 | \*scratch\* 22 | /.gitignore~ 23 | *.hex 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Unified Retrocomputer Keyboard Project 2 | 3 | This project aims to provide a unified collection of keyboards and encoders for vintage computers, with modular design to reuse as many elements as possible across the designs. 4 | 5 | Home computers of the 1970's typically either polled a switch matrix, or interfaced to a parallel ASCII keyboard via a parallel port. 6 | 7 | The keyboard allows use of Cherry MX keys, or Futaba MD-4PCS (aka George Risk KBM-01-01) keys. 8 | 9 | The keyboard is designed using KiCad in order to be the most useful for anybody wishing to modify the keyboard for more specific uses, or to add to the project. 10 | 11 | ### Capabilities so far: 12 | - Replacement keyboard for OSI computers 13 | - Replacement keyboard for Apple II/II+ computers 14 | - Replacement keyboard for the Sol-20 computer 15 | - Generic ADM-3A/Teletype style keyboard 16 | - Apple I keyboard (multiple styles) 17 | - Franklin ACE 1000 replacement keyboard by Chris Ryu (https://github.com/ryucats/Franklin-ACE-1000-Keyboard) 18 | 19 | ### Coming soon: 20 | - Replace encoder board on Apple II/II+ keyboards 21 | - Convert an OSI 542 keyboard into a generic ASCII keyboard 22 | - Replica for Knight keyboard 23 | 24 | ### This keyboard project so far consists of: 25 | - A classic retro-style ASCII keyboard, modeled after the ADM-3A keyboard, which 26 | can be also be populated to fit perfectly in an Apple II/II+ case (with corresponding Apple II keymaps), or an OSI 27 | case (with OSI adapter). 28 | - A Sol-20 compatible keyboard. 29 | - Keyscan/decoder interface modules that can output parallel ASCII, and can be adapted for other protocols. 30 | - An OSI interface module, to connect the classic keyboard to an OSI computer. 31 | -------------------------------------------------------------------------------- /firmware/asdf/Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | name = "pypi" 3 | url = "https://pypi.org/simple" 4 | verify_ssl = true 5 | 6 | [dev-packages] 7 | black = "*" 8 | flake8 = "*" 9 | pylint = "*" 10 | mypy = "*" 11 | 12 | [packages] 13 | sphinx = "*" 14 | sphinx-autodoc-typehints = "*" 15 | sphinx-rtd-theme = "*" 16 | toml = "*" 17 | intelhex = "*" 18 | 19 | [requires] 20 | python_version = "3" 21 | -------------------------------------------------------------------------------- /firmware/asdf/docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /firmware/asdf/docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | %SPHINXBUILD% >NUL 2>NUL 14 | if errorlevel 9009 ( 15 | echo. 16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 17 | echo.installed, then set the SPHINXBUILD environment variable to point 18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 19 | echo.may add the Sphinx directory to PATH. 20 | echo. 21 | echo.If you don't have Sphinx installed, grab it from 22 | echo.https://www.sphinx-doc.org/ 23 | exit /b 1 24 | ) 25 | 26 | if "%1" == "" goto help 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /firmware/asdf/docs/source/_templates/hexfile_link.in: -------------------------------------------------------------------------------- 1 | .. _@ARCH@ Rev @CMAKE_PROJECT_VERSION@: 2 | 3 | ASDF Rev @CMAKE_PROJECT_VERSION@ hex file (@ARCH@) 4 | ---------------------------------------------------------------------------------- 5 | 6 | :ASDF Firmware @CMAKE_PROJECT_VERSION@-@ARCH@: 7 | :download:`@hex_file@` 8 | -------------------------------------------------------------------------------- /firmware/asdf/docs/source/_templates/index.rst.in: -------------------------------------------------------------------------------- 1 | Unified Retro Keyboard firmware (ASDF) rev @CMAKE_PROJECT_VERSION@ 2 | ======================================================================= 3 | 4 | .. toctree:: 5 | :caption: Downloads 6 | :glob: 7 | 8 | toc_* 9 | -------------------------------------------------------------------------------- /firmware/asdf/docs/source/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # This file only contains a selection of the most common options. For a full 4 | # list see the documentation: 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 | 7 | # -- Path setup -------------------------------------------------------------- 8 | 9 | # If extensions (or modules to document with autodoc) are in another directory, 10 | # add these directories to sys.path here. If the directory is relative to the 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. 12 | # 13 | import os 14 | import sys 15 | import re 16 | import toml 17 | 18 | # -- Project information ----------------------------------------------------- 19 | 20 | project = "ASDF - Unified Retro Keyboard Firmware" 21 | copyright = "2022 Osiweb.org" 22 | author = "David F" 23 | 24 | # -- General configuration --------------------------------------------------- 25 | 26 | # Add any Sphinx extension module names here, as strings. They can be 27 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 28 | # ones. 29 | extensions = [ 30 | "sphinx.ext.napoleon", 31 | "sphinx.ext.autodoc", # Core library for html generation from docstrings 32 | "sphinx_autodoc_typehints", 33 | "sphinx.ext.viewcode", 34 | "sphinx.ext.autosectionlabel", 35 | "sphinx.ext.autosummary", # Create neat summary tables 36 | ] 37 | autosummary_generate = True # Turn on sphinx.ext.autosummary 38 | 39 | # Add any paths that contain templates here, relative to this directory. 40 | templates_path = ["_templates"] 41 | 42 | # List of patterns, relative to source directory, that match files and 43 | # directories to ignore when looking for source files. 44 | # This pattern also affects html_static_path and html_extra_path. 45 | exclude_patterns = [] 46 | 47 | 48 | # -- Options for HTML output ------------------------------------------------- 49 | 50 | # The theme to use for HTML and HTML Help pages. See the documentation for 51 | # a list of builtin themes. 52 | # 53 | html_theme = "sphinx_rtd_theme" 54 | 55 | # Add any paths that contain custom static files (such as style sheets) here, 56 | # relative to this directory. They are copied after the builtin static files, 57 | # so a file named "default.css" will overwrite the builtin "default.css". 58 | html_static_path = [ 59 | "_static" 60 | ] # Configuration file for the Sphinx documentation builder. 61 | # 62 | # For the full list of built-in configuration values, see the documentation: 63 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 64 | -------------------------------------------------------------------------------- /firmware/asdf/eeprom-spec.org: -------------------------------------------------------------------------------- 1 | * EEPROM management 2 | ** Uses 3 | *** Store current keyboard ID 4 | *** Store status of various options 5 | **** key repeat rates and delays 6 | **** communications delays 7 | **** serial baud rates 8 | **** keyboard macros 9 | **** keyboard specific options 10 | ***** all caps / upper+lower 11 | ***** handling of special keys 12 | ** Allocate on demand 13 | ** System block does not change as keyboards are changed 14 | *** Items include: 15 | **** current keyboard 16 | *** All system block allocation must occur before any keyboard allocation may occur. 17 | *** Once system EEPROM is allocated, system EEPROM is "locked" 18 | *** If system EEPROM is locked, then EEPROM cannot be reallocated, although the parameters may be re-written. 19 | *** provision to unlock EEPROM, for example, when firmware is updated, or during development 20 | 21 | ** Keyboard block is reset whenever the keyboard changes 22 | *** Any parameters specific to a keyboard, such as macros, keymap-specific settings, etc. are stored here. 23 | *** This section is erased when keymap changes, but not when a keymap is loaded from EEPROM at powerup. 24 | 25 | * Architecture 26 | ** Device independent layer - allows diferent devices including on-chip EEPROM, off-chip EEPROM, and other technologies such as FRAM. An API that implements the following: 27 | *** Read a byte/word from EEPROM 28 | *** Write a byte/word to EEPROM 29 | *** Erase a range of EEPROM 30 | *** Return size of storage (in bytes) 31 | ** Allocation layer 32 | *** Store an arbitrary length string to a numbers slot (0-ff) 33 | *** retrieve an arbitrary length string from a numbered slot (0-ff) 34 | *** delete a string an a numbered slot (0-ff). Probably accomplish by storing a 0-length string. 35 | *** Initialize an arbitary portion of storage (including all storage) 36 | 37 | ** Architecture for allocation layer: 38 | *** Pointer to first "free" block. This is a linked list of blocks. 39 | *** Table of starting positions and lengths. Starting position will be 2 bytes, and will indicate a 1 or 2 byte boundary1, 2, or 4-byte words, determined by storage size. Number of elements in table will also be determined by storage size, up to max 255. 40 | *** Initialize with a free block of all available storage 41 | *** Allocate storage from beginning of free block. 42 | *** The beginning of each block is a header including a "size" value (1 or 2 bytes) and a "link" address, 1, 2, or 4 bytes, same as the index table. For free blocks, the "size" is always a contiguous size. For allocated blocks, the size is the total size of all the blocks linked in a list. 43 | *** To allocate: 44 | ***** Look up the first free block 45 | ***** If the string can fit in the size of the free block: 46 | ****** then store size in the size field 47 | ****** store "0" in the link 48 | ****** store the string next. 49 | ****** If there is any space left over in the free block, then create a new "free block" from the next few bytes, and add to the front of the "free" list. 50 | ***** If the string cannot fit in the size of the free block: 51 | ****** store the size in the size field 52 | ****** Leave the "link" address, which points to the next free block 53 | ****** Store the string text 54 | ****** jump to the next free block, and repeat the above for the remainder of the string. 55 | ****** keep repeating until the string can fit in a free block. 56 | ****** If there is no more free block, and not enough room to store the text, then store as much as possible, then stop. 57 | *** To free: 58 | ***** Look up the string address in the index 59 | ***** Zero out the index entry for the string. 60 | ***** Look at the size of the string. If the next contiguous block is also free, then combine and store the size of the combined block at the beginning of the block. 61 | ****** repeat the above until next contiguous block is not free 62 | ***** Please free block at the beginning of the "free" list. 63 | -------------------------------------------------------------------------------- /firmware/asdf/keymap_list.cmake: -------------------------------------------------------------------------------- 1 | list(APPEND keymap_list 2 | "" 3 | "" 4 | "" 5 | "" 6 | "" 7 | "" 8 | ) 9 | -------------------------------------------------------------------------------- /firmware/asdf/src/ARCHITECTURE-keymaps.org: -------------------------------------------------------------------------------- 1 | * Keymap architecture 2 | ** Keymap definition modules are in src/Keymaps 3 | ** Each keymap has its own keymap setup routine 4 | *** void setup_mapname_keymap(void) - keymap setup function 5 | **** register a keycode map for each modifier combination 6 | ***** The keycode maps are in flash (ROM) 7 | **** set up virtual devices for the keymap 8 | ***** virtual device to physical device mapping 9 | ***** associated virtual device function on activate/deactivate 10 | ***** initial state 11 | **** set up function hooks used by keymap 12 | 13 | ** Keymap definition API 14 | *** mapping keys 15 | #include "asdf_keymaps.h" 16 | **** asdf_keymaps_add_map() - called from 17 | Assigns a specified keymap matrix (ptr to FLASH) to a given keymap and modifier type. 18 | *** adding virtual devices - called from keymap setup routine 19 | **** asdf_virtual_init() 20 | ***** Clears the virtual device table for the keymap 21 | ***** initialize first entry in virtual device table to NULL 22 | **** asdf_virtual_add_device() 23 | ***** Accept a virtual device code, a physical device code, a default function, and a default initial value, and create a new entry in the virtual device table. 24 | ***** increment the virtual device table pointer and set next (last) entry to NULL 25 | 26 | 27 | * DIP SWITCHES 28 | Note that the DIP switches are keys in the key matrix, which is initialized to 29 | the all unpressed state at startup. Since the keymap is initialized to 0, the 30 | keymap is consistent with the presumed initial state of the DIP switches. If 31 | the DIP switches are not set to Keymap 0, then their position will be detected 32 | as keypresses, and the correct keymap will be set. 33 | 34 | -------------------------------------------------------------------------------- /firmware/asdf/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | message("C compiler: ${CMAKE_C_COMPILER}") 2 | 3 | function(create_keymap_setups keymaps keymap_table) 4 | list(TRANSFORM keymaps REPLACE "<\(.+\):\(.+\)>" "\n case \\2: setup_\\1_keymap();break" OUTPUT_VARIABLE temp_list) 5 | # we can keep the ';' cmake list separators as the C statement separators. 6 | # However, we need to append an extra ';' at the end. 7 | string(APPEND temp_list ";") 8 | set(${keymap_table} "${temp_list}" PARENT_SCOPE) 9 | endfunction(create_keymap_setups) 10 | 11 | function(create_keymap_valid keymaps keymap_valid) 12 | list(TRANSFORM keymaps REPLACE "<\(.+\):\(.+\)>" "\n case \\2:" OUTPUT_VARIABLE temp_list) 13 | # we can keep the ';' cmake list separators as the C statement separators. 14 | # However, we need to append an extra ';' at the end. 15 | string(APPEND temp_list ";") 16 | set(${keymap_valid} "${temp_list}" PARENT_SCOPE) 17 | endfunction(create_keymap_valid) 18 | 19 | function(create_keymap_declarations keymaps keymap_decl) 20 | list(TRANSFORM keymaps REPLACE "<\(.+\):\(.+\)>" "\n void setup_\\1_keymap(void)" OUTPUT_VARIABLE temp_list) 21 | # we can keep the ';' cmake list separators as the C statement separators. 22 | # However, we need to append an extra ';' at the end. 23 | string(APPEND temp_list ";") 24 | set(${keymap_decl} "${temp_list}" PARENT_SCOPE) 25 | endfunction(create_keymap_declarations) 26 | 27 | function(create_keymap_report keymaps keymap_report) 28 | list(TRANSFORM keymaps REPLACE "<\(.+\):\(.+\)>" "\nkeymap [\\2]: \\1" OUTPUT_VARIABLE temp_list) 29 | string(REPLACE ";" "" temp_list2 "${temp_list}") 30 | set(${keymap_report} "${temp_list2}" PARENT_SCOPE) 31 | endfunction(create_keymap_report) 32 | 33 | include(../keymap_list.cmake) 34 | 35 | create_keymap_setups("${keymap_list}" keymap_table) 36 | create_keymap_valid("${keymap_list}" keymap_valid) 37 | create_keymap_report("${keymap_list}" keymap_report) 38 | create_keymap_declarations("${keymap_list}" keymap_declarations) 39 | 40 | message("**********************") 41 | message("Keymap table: ${keymap_report}") 42 | message("**********************\n\n") 43 | 44 | set (PROJECT_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}) 45 | 46 | configure_file(${PROJECT_SRC_DIR}/Arch/asdf_arch_${ARCH_FAMILY}.h ${CMAKE_CURRENT_BINARY_DIR}/asdf_arch.h COPYONLY) 47 | configure_file(${PROJECT_SRC_DIR}/Arch/asdf_arch_${ARCH_FAMILY}.c ${CMAKE_CURRENT_BINARY_DIR}/asdf_arch.c COPYONLY) 48 | configure_file(${PROJECT_SRC_DIR}/asdf_keymap_setup.c.in ${CMAKE_CURRENT_BINARY_DIR}/asdf_keymap_setup.c) 49 | configure_file(${PROJECT_SRC_DIR}/asdf_keymap_setup.h.in ${CMAKE_CURRENT_BINARY_DIR}/asdf_keymap_setup.h) 50 | 51 | 52 | c_toolchain_flags() 53 | 54 | list (APPEND SOURCES 55 | asdf.c 56 | ${CMAKE_CURRENT_BINARY_DIR}/asdf_arch.c 57 | ${CMAKE_CURRENT_BINARY_DIR}/asdf_keymap_setup.c 58 | asdf_buffer.c 59 | asdf_hook.c 60 | asdf_keymap_setup.c 61 | asdf_keymaps.c 62 | asdf_modifiers.c 63 | asdf_physical.c 64 | asdf_repeat.c 65 | asdf_virtual.c 66 | asdf_print.c 67 | Keymaps/asdf_keymap_classic.c 68 | Keymaps/asdf_keymap_classic_caps.c 69 | Keymaps/asdf_keymap_classic_add_map.c 70 | Keymaps/asdf_keymap_apple2.c 71 | Keymaps/asdf_keymap_apple2_caps.c 72 | Keymaps/asdf_keymap_apple2_add_map.c 73 | Keymaps/asdf_keymap_sol.c 74 | Keymaps/asdf_keymap_ace1000.c 75 | Keymaps/asdf_keymap_ace1000_add_map.c 76 | main.c 77 | ) 78 | 79 | # create a library for the keymap modules 80 | #add_subdirectory(Keymaps) 81 | 82 | # add the executable 83 | if (COMMAND custom_add_executable) 84 | custom_add_executable(${PROJECT_TARGET_NAME} 85 | ${SOURCES} 86 | ) 87 | else() 88 | add_executable(${PROJECT_TARGET_NAME} 89 | ${SOURCES} 90 | ) 91 | endif() 92 | 93 | target_include_directories(${PROJECT_EXECUTABLE_TARGET_NAME} 94 | PRIVATE 95 | ${CMAKE_CURRENT_BINARY_DIR} 96 | ${CMAKE_CURRENT_SOURCE_DIR} 97 | ${CMAKE_CURRENT_SOURCE_DIR}/Keymaps 98 | 99 | ) 100 | 101 | target_compile_options(${PROJECT_EXECUTABLE_TARGET_NAME} 102 | PRIVATE 103 | ${CFLAGS} 104 | ) 105 | 106 | #target_link_libraries(${PROJECT_EXECUTABLE_TARGET_NAME} 107 | # keymaps 108 | # ) 109 | -------------------------------------------------------------------------------- /firmware/asdf/src/Keymaps/_clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Mozilla 3 | AlignAfterOpenBracket: Align 4 | AlignOperands: 'true' 5 | AlignTrailingComments: 'true' 6 | AllowAllParametersOfDeclarationOnNextLine: 'false' 7 | AllowShortBlocksOnASingleLine: 'false' 8 | AllowShortCaseLabelsOnASingleLine: 'true' 9 | AllowShortFunctionsOnASingleLine: Empty 10 | AllowShortIfStatementsOnASingleLine: 'false' 11 | AllowShortLoopsOnASingleLine: 'true' 12 | AlwaysBreakAfterDefinitionReturnType: None 13 | AlwaysBreakAfterReturnType: None 14 | AlwaysBreakBeforeMultilineStrings: 'true' 15 | BinPackArguments: 'true' 16 | BinPackParameters: 'true' 17 | BreakBeforeBinaryOperators: NonAssignment 18 | BreakBeforeBraces: Stroustrup 19 | ColumnLimit: '100' 20 | ConstructorInitializerIndentWidth: '2' 21 | ContinuationIndentWidth: '2' 22 | DerivePointerAlignment: 'false' 23 | DisableFormat: 'false' 24 | IncludeBlocks: Preserve 25 | IndentCaseLabels: 'true' 26 | IndentPPDirectives: None 27 | IndentWidth: '2' 28 | IndentWrappedFunctionNames: 'false' 29 | KeepEmptyLinesAtTheStartOfBlocks: 'true' 30 | Language: Cpp 31 | MaxEmptyLinesToKeep: '2' 32 | PointerAlignment: Right 33 | ReflowComments: 'true' 34 | SortIncludes: 'false' 35 | SpaceAfterCStyleCast: 'true' 36 | SpaceBeforeAssignmentOperators: 'true' 37 | SpaceBeforeParens: ControlStatements 38 | SpaceInEmptyParentheses: 'false' 39 | SpacesBeforeTrailingComments: '1' 40 | SpacesInCStyleCastParentheses: 'false' 41 | SpacesInParentheses: 'false' 42 | SpacesInSquareBrackets: 'false' 43 | TabWidth: '8' 44 | UseTab: Never 45 | 46 | ... 47 | -------------------------------------------------------------------------------- /firmware/asdf/src/Keymaps/asdf_keymap_ace1000.c: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_classic.c 7 | // 8 | // Implements the Franklin ACE 1000 replacement keyboard keymaps 9 | // https://github.com/ryucats/Franklin-ACE-1000-Keyboard 10 | // 11 | // Copyright 2023 Chris RYU 12 | // Copyright 2019 David Fenyes 13 | // 14 | // This program is free software: you can redistribute it and/or modify it under 15 | // the terms of the GNU General Public License as published by the Free Software 16 | // Foundation, either version 3 of the License, or (at your option) any later 17 | // version. 18 | // 19 | // This program is distributed in the hope that it will be useful, but WITHOUT 20 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | // details. 23 | // 24 | // You should have received a copy of the GNU General Public License along with 25 | // this program. If not, see . 26 | // 27 | 28 | #include "asdf.h" 29 | #include "asdf_keymaps.h" 30 | #include "asdf_virtual.h" 31 | #include "asdf_modifiers.h" 32 | #include "asdf_print.h" 33 | #include "asdf_keymap_ace1000.h" 34 | #include "asdf_keymap_ace1000_add_map.h" 35 | #include "asdf_keymap_apple2_add_map.h" 36 | 37 | void ace1000_id_message(void) { 38 | asdf_print("[Keymap: ace1000]\n"); 39 | } 40 | 41 | // PROCEDURE: 42 | // INPUTS: 43 | // OUTPUTS: 44 | // 45 | // DESCRIPTION: 46 | // 47 | // SIDE EFFECTS: 48 | // 49 | // NOTES: 50 | // 51 | // SCOPE: 52 | // 53 | // COMPLEXITY: 54 | // 55 | 56 | void setup_ace1000_keymap(void) 57 | { 58 | asdf_set_print_delay(ASDF_ACE1000_PRINT_SPEED); //msec 59 | 60 | ace1000_add_map(ACE1000_PLAIN_MAP, MOD_PLAIN_MAP); 61 | ace1000_add_map(ACE1000_CAPS_MAP, MOD_CAPS_MAP); 62 | ace1000_add_map(ACE1000_SHIFT_MAP, MOD_SHIFT_MAP); 63 | ace1000_add_map(ACE1000_CTRL_MAP, MOD_CTRL_MAP); 64 | 65 | asdf_hook_assign(ACE1000_ID_MESSAGE_HOOK, ace1000_id_message); 66 | asdf_hook_assign(APPLESOFT_KEYBOARD_TEST_HOOK, ace1000_keyboard_test); 67 | 68 | // Assign power LED to virtual power LED, and initialize to ON 69 | asdf_virtual_assign(ACE1000_VIRTUAL_POWER_LED, ACE1000_POWER_LED, V_NOFUNC, ACE1000_POWER_LED_INIT_VALUE); 70 | 71 | // Assign CAPS LED to virtual CAPS LED, and initialize to the INIT value, to 72 | // match the initial CAPSLOCK state. The capslock state code will alter the 73 | // virtual LED according to the state. 74 | 75 | asdf_virtual_assign(VCAPS_LED, ACE1000_CAPS_LED, V_NOFUNC, ACE1000_CAPS_LED_INIT_VALUE); 76 | 77 | // assign RESET output to the virtual RESET output, configure to produce a short pulse when activated 78 | asdf_virtual_assign(ACE1000_VIRTUAL_RESET, ACE1000_RESET_OUTPUT, V_PULSE_SHORT, !ACE1000_RESET_ACTIVE_VALUE); 79 | 80 | // assign the CLRSCR output to the virtual CLRSCR output, configure to produce a long pulse when activated 81 | asdf_virtual_assign(ACE1000_VIRTUAL_CLR_SCR, ACE1000_CLR_SCR_OUT, V_PULSE_LONG, !ACE1000_CLR_SCR_ACTIVE_VALUE); 82 | 83 | // turn on caps lock 84 | asdf_modifier_capslock_activate(); 85 | } 86 | 87 | 88 | //-------|---------|---------+---------+---------+---------+---------+---------+ 89 | // Above line is 80 columns, and should display completely in the editor. 90 | -------------------------------------------------------------------------------- /firmware/asdf/src/Keymaps/asdf_keymap_ace1000.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unfified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_ace1000.h 7 | // 8 | // ASCII keymaps for the Franklin ACE 1000 replacement keyboard 9 | // https://github.com/ryucats/Franklin-ACE-1000-Keyboard 10 | // 11 | // Copyright 2023 Chris RYU 12 | // Copyright 2019 David Fenyes 13 | // 14 | // This program is free software: you can redistribute it and/or modify it under 15 | // the terms of the GNU General Public License as published by the Free Software 16 | // Foundation, either version 3 of the License, or (at your option) any later 17 | // version. 18 | // 19 | // This program is distributed in the hope that it will be useful, but WITHOUT 20 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | // details. 23 | // 24 | // You should have received a copy of the GNU General Public License along with 25 | // this program. If not, see . 26 | 27 | 28 | // To use this ascii for a new keymap, edit the keymaps definitions as 29 | // desired. The keymaps are organized from row 0, counting upward, and each row 30 | // includes the columns from 0-NUM_COLS. 31 | // 32 | 33 | #if !defined(ASDF_KEYMAP_DEFS_ACE1000_H) 34 | #define ASDF_KEYMAP_DEFS_ACE1000_H 35 | 36 | #include "asdf_hook.h" 37 | 38 | // Edit the number of rows and columns used in this map. If the number is less 39 | // than the maxium, the unused elements will be initialized to 0. 40 | 41 | #define ACE1000_NUM_ROWS 10 // DIP switches are row 8 (zero based) 42 | #define ACE1000_NUM_COLS 8 43 | 44 | #define ACE1000_ACTION_BREAK ACTION_NOTHING 45 | 46 | #define ACE1000_VIRTUAL_RESET VOUT1 47 | #define ACE1000_ACTION_RESET ACTION_VOUT1 48 | #define ACE1000_RESET_OUTPUT PHYSICAL_OUT3_OPEN_HI 49 | #define ACE1000_RESET_ACTIVE_VALUE 0 50 | 51 | #define ACE1000_VIRTUAL_CLR_SCR VOUT2 52 | #define ACE1000_ACTION_CLEAR ACTION_VOUT2 53 | #define ACE1000_CLR_SCR_OUT PHYSICAL_OUT1_OPEN_LO 54 | #define ACE1000_CLR_SCR_ACTIVE_VALUE 1 55 | 56 | #define ACE1000_VIRTUAL_POWER_LED VLED1 57 | #define ACE1000_POWER_LED PHYSICAL_LED1 58 | #define ACE1000_POWER_LED_INIT_VALUE 1 59 | 60 | #define ACE1000_CAPS_LED PHYSICAL_LED3 61 | #define ACE1000_CAPS_LED_INIT_VALUE 0 62 | 63 | #define ACE1000_ID_MESSAGE_HOOK ASDF_HOOK_USER_10 64 | #define APPLESOFT_KEYBOARD_TEST_HOOK ASDF_HOOK_USER_9 65 | 66 | #define ASDF_ACE1000_PRINT_SPEED 40 67 | 68 | #endif /* !defined (ASDF_KEYMAP_DEFS_ACE1000_H) */ 69 | 70 | //-------|---------|---------+---------+---------+---------+---------+---------+ 71 | // Above line is 80 columns, and should display completely in the editor. 72 | -------------------------------------------------------------------------------- /firmware/asdf/src/Keymaps/asdf_keymap_apple2.c: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_apple2.c 7 | // 8 | // set up keymaps for Apple II keyboards 9 | // 10 | // Copyright 2019 David Fenyes 11 | // 12 | // This program is free software: you can redistribute it and/or modify it under 13 | // the terms of the GNU General Public License as published by the Free Software 14 | // Foundation, either version 3 of the License, or (at your option) any later 15 | // version. 16 | // 17 | // This program is distributed in the hope that it will be useful, but WITHOUT 18 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 20 | // details. 21 | // 22 | // You should have received a copy of the GNU General Public License along with 23 | // this program. If not, see . 24 | // 25 | 26 | 27 | #include "asdf_print.h" 28 | #include "asdf_hook.h" 29 | #include "asdf_keymaps.h" 30 | #include "asdf_virtual.h" 31 | #include "asdf_modifiers.h" 32 | #include "asdf_keymap_apple2_add_map.h" 33 | #include "asdf_keymap_apple2.h" 34 | 35 | // PROCEDURE: 36 | // INPUTS: 37 | // OUTPUTS: 38 | // 39 | // DESCRIPTION: 40 | // 41 | // SIDE EFFECTS: 42 | // 43 | // NOTES: 44 | // 45 | // SCOPE: 46 | // 47 | // COMPLEXITY: 48 | // 49 | 50 | void apple2_id_message(void) 51 | { 52 | asdf_print("[Keymap: Apple 2 (u/l case)]"); 53 | } 54 | 55 | void setup_apple2_keymap(void) 56 | { 57 | asdf_set_print_delay(APPLE2_PRINT_DELAY); 58 | 59 | 60 | apple_add_map(APPLE_PLAIN_MAP, MOD_PLAIN_MAP); 61 | apple_add_map(APPLE_CAPS_MAP, MOD_CAPS_MAP); 62 | apple_add_map(APPLE_SHIFT_MAP, MOD_SHIFT_MAP); 63 | apple_add_map(APPLE_CTRL_MAP, MOD_CTRL_MAP); 64 | 65 | asdf_hook_assign(APPLESOFT_KEYBOARD_TEST, applesoft_keyboard_test); 66 | asdf_hook_assign(APPLE2_ID_MESSAGE, apple2_id_message); 67 | 68 | // Attach the physical POWER LED as the CAPS LED. Assign no triggered 69 | // function, and initialize to initial state of the CAPS logic. The CAPS LED 70 | // will be controlled by the state of the CAPSLOCK logic. 71 | 72 | asdf_virtual_assign(VCAPS_LED, APPLE_POWER_LED, V_NOFUNC, APPLE_POWER_LED_INIT_VALUE); 73 | 74 | // Assign CAPS LED to off (disabled) 75 | asdf_virtual_assign(APPLE_VIRTUAL_DISABLED_LED, APPLE_DISABLED_LED, V_NOFUNC, APPLE_DISABLED_INIT_VALUE); 76 | 77 | // assign RESET output to the virtual RESET output, configure to produce a short pulse when activated 78 | asdf_virtual_assign(APPLE_VIRTUAL_RESET, APPLE_RESET_OUTPUT, V_PULSE_SHORT, !APPLE_RESET_ACTIVE_VALUE); 79 | 80 | // assign the CLRSCR output to the virtual CLRSCR output, configure to produce a long pulse when activated 81 | asdf_virtual_assign(APPLE_VIRTUAL_CLR_SCR, APPLE_CLR_SCR_OUTPUT, V_PULSE_LONG, !APPLE_CLR_SCR_ACTIVE_VALUE); 82 | 83 | asdf_modifier_capslock_activate(); // For Apple 2, start with CAPS active 84 | } 85 | 86 | 87 | //-------|---------|---------+---------+---------+---------+---------+---------+ 88 | // Above line is 80 columns, and should display completely in the editor. 89 | 90 | -------------------------------------------------------------------------------- /firmware/asdf/src/Keymaps/asdf_keymap_apple2.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unfified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_apple2.h 7 | // 8 | // Apple 2 keymaps 9 | // 10 | // Copyright 2019 David Fenyes 11 | // 12 | // This program is free software: you can redistribute it and/or modify it under 13 | // the terms of the GNU General Public License as published by the Free Software 14 | // Foundation, either version 3 of the License, or (at your option) any later 15 | // version. 16 | // 17 | // This program is distributed in the hope that it will be useful, but WITHOUT 18 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 20 | // details. 21 | // 22 | // You should have received a copy of the GNU General Public License along with 23 | // this program. If not, see . 24 | 25 | 26 | // This file supplies the Apple 2 ASCII keyboard keymap. Two variants are provided: 27 | // 28 | // 1) An Upper/Lowercase variant. This variant moves the @ and ^ symbols from 29 | // the P and N keys to the REPEAT key, since the P and N keys need to reserve 30 | // the shifted value for the uppercase characters. Also, the "Power" key 31 | // doubles as a caps-lock key. 32 | // 33 | // 2) A CAPS only keyboard, following the standard Apple II conventions and 34 | // layout, with ^ above the N key and @ above the P key, and a functioning 35 | // REPEAT key. 36 | // 37 | // For both variants, CTRL+RESET is required for a system reset. 38 | 39 | #if !defined(ASDF_KEYMAP_DEFS_APPLE2_H) 40 | #define ASDF_KEYMAP_DEFS_APPLE2_H 41 | 42 | #include "asdf_hook.h" 43 | 44 | #define APPLESOFT_KEYBOARD_TEST ASDF_HOOK_USER_3 45 | #define APPLE2_ID_MESSAGE ASDF_HOOK_USER_10 46 | #define APPLE2_ASCII_TEST ASDF_HOOK_USER_11 47 | 48 | #define APPLE2_PRINT_DELAY 40 // msec 49 | 50 | 51 | #endif /* !defined (ASDF_KEYMAP_DEFS_APPLE2_H) */ 52 | 53 | //-------|---------|---------+---------+---------+---------+---------+---------+ 54 | // Above line is 80 columns, and should display completely in the editor. 55 | -------------------------------------------------------------------------------- /firmware/asdf/src/Keymaps/asdf_keymap_apple2_add_map.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unfified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_apple_add_map.h 7 | // 8 | // defines keymap matrices and add_map() function for apple2 layouts 9 | // 10 | // Copyright 2019 David Fenyes 11 | // 12 | // This program is free software: you can redistribute it and/or modify it under 13 | // the terms of the GNU General Public License as published by the Free Software 14 | // Foundation, either version 3 of the License, or (at your option) any later 15 | // version. 16 | // 17 | // This program is distributed in the hope that it will be useful, but WITHOUT 18 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 20 | // details. 21 | // 22 | // You should have received a copy of the GNU General Public License along with 23 | // this program. If not, see . 24 | 25 | 26 | // To use this ascii for a new keymap, edit the keymaps definitions as 27 | // desired. The keymaps are organized from row 0, counting upward, and each row 28 | // includes the columns from 0-NUM_COLS. 29 | // 30 | 31 | #if !defined(ASDF_KEYMAP_APPLE_ADD_MAP_H) 32 | #define ASDF_KEYMAP_APPLE_ADD_MAP_H 33 | 34 | #include "asdf_keymap_defs_dipswitch.h" 35 | #include "asdf_modifiers.h" 36 | 37 | #define ASDF_APPLE2_NUM_ROWS 9 // DIP switches are row 8 (zero-based) 38 | #define ASDF_APPLE2_NUM_COLS 8 39 | 40 | #define APPLE_ACTION_RESET ACTION_VOUT1 41 | #define APPLE_VIRTUAL_RESET VOUT1 42 | #define APPLE_RESET_OUTPUT PHYSICAL_OUT3_OPEN_HI 43 | #define APPLE_RESET_ACTIVE_VALUE 0 44 | 45 | #define APPLE_ACTION_CLEAR ACTION_VOUT2 46 | #define APPLE_VIRTUAL_CLR_SCR VOUT2 47 | #define APPLE_CLR_SCR_OUTPUT PHYSICAL_OUT1_OPEN_LO 48 | #define APPLE_CLR_SCR_ACTIVE_VALUE 1 49 | 50 | #define APPLE_VIRTUAL_POWER_LED VLED1 51 | #define APPLE_POWER_LED PHYSICAL_LED1 52 | #define APPLE_POWER_LED_INIT_VALUE 0 // Toggles when caps lock is activated 53 | 54 | #define APPLE_VIRTUAL_DISABLED_LED VLED2 55 | #define APPLE_DISABLED_LED PHYSICAL_LED3 56 | #define APPLE_DISABLED_INIT_VALUE 0 57 | 58 | #define ASDF_APPLE2_DIP_SWITCHES ASDF_KEYMAP_DIP_SWITCHES 59 | 60 | #define APPLE_LEFT_ARROW ASCII_CTRL_H 61 | #define APPLE_RIGHT_ARROW ASCII_CTRL_U 62 | 63 | typedef enum { 64 | APPLE_PLAIN_MAP, 65 | APPLE_CAPS_MAP, 66 | APPLE_SHIFT_MAP, 67 | APPLE_CAPS_SHIFT_MAP, 68 | APPLE_CTRL_MAP 69 | } apple_map_index_t; 70 | 71 | 72 | // function prototypes 73 | void applesoft_keyboard_test(void); 74 | 75 | void apple_add_map(const apple_map_index_t map_index, modifier_index_t modifier_index); 76 | 77 | #endif /* !defined (ASDF_KEYMAP_APPLE_ADD_MAP_H) */ 78 | 79 | //-------|---------|---------+---------+---------+---------+---------+---------+ 80 | // Above line is 80 columns, and should display completely in the editor. 81 | -------------------------------------------------------------------------------- /firmware/asdf/src/Keymaps/asdf_keymap_apple2_caps.c: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_apple2_caps.c 7 | // 8 | // set up keymaps for ALL CAPS Apple II keyboards 9 | // 10 | // Copyright 2019 David Fenyes 11 | // 12 | // This program is free software: you can redistribute it and/or modify it under 13 | // the terms of the GNU General Public License as published by the Free Software 14 | // Foundation, either version 3 of the License, or (at your option) any later 15 | // version. 16 | // 17 | // This program is distributed in the hope that it will be useful, but WITHOUT 18 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 20 | // details. 21 | // 22 | // You should have received a copy of the GNU General Public License along with 23 | // this program. If not, see . 24 | // 25 | 26 | 27 | #include "asdf_print.h" 28 | #include "asdf_keymaps.h" 29 | #include "asdf_virtual.h" 30 | #include "asdf_modifiers.h" 31 | #include "asdf_keymap_apple2_add_map.h" 32 | #include "asdf_keymap_apple2_caps.h" 33 | 34 | void apple2_caps_id_message(void) { 35 | asdf_print("[Keymap: Apple 2 CAPS]"); 36 | } 37 | 38 | // PROCEDURE: setup_apple2_caps_keymap 39 | // INPUTS: none 40 | // OUTPUTS: none 41 | // 42 | // DESCRIPTION: Set up keymaps for ALL CAPS apple 2 keyboard 43 | // 44 | // SIDE EFFECTS: See DESCRIPTION 45 | // 46 | // NOTES: 47 | // 48 | // SCOPE: public 49 | // 50 | // COMPLEXITY: 1 51 | // 52 | void setup_apple2_caps_keymap(void) 53 | { 54 | asdf_set_print_delay(APPLE2_PRINT_DELAY); 55 | 56 | apple_add_map(APPLE_CAPS_MAP, MOD_PLAIN_MAP); 57 | apple_add_map(APPLE_CAPS_MAP, MOD_CAPS_MAP); 58 | apple_add_map(APPLE_CAPS_SHIFT_MAP, MOD_SHIFT_MAP); 59 | apple_add_map(APPLE_CTRL_MAP, MOD_CTRL_MAP); 60 | 61 | asdf_hook_assign(APPLESOFT_KEYBOARD_TEST, applesoft_keyboard_test); 62 | asdf_hook_assign(APPLE2_CAPS_ID_MESSAGE, apple2_caps_id_message); 63 | 64 | // Turn the POWER LED on and don't assign to any function 65 | 66 | asdf_virtual_assign(APPLE_VIRTUAL_POWER_LED, APPLE_POWER_LED, V_NOFUNC, APPLE_POWER_LED_INIT_VALUE); 67 | 68 | // Assign CAPS LED to off (disabled) 69 | asdf_virtual_assign(APPLE_VIRTUAL_DISABLED_LED, APPLE_DISABLED_LED, V_NOFUNC, APPLE_DISABLED_INIT_VALUE); 70 | 71 | // assign RESET output to the virtual RESET output, configure to produce a short pulse when activated 72 | asdf_virtual_assign(APPLE_VIRTUAL_RESET, APPLE_RESET_OUTPUT, V_PULSE_SHORT, !APPLE_RESET_ACTIVE_VALUE); 73 | 74 | // assign the CLRSCR output to the virtual CLRSCR output, configure to produce a long pulse when activated 75 | asdf_virtual_assign(APPLE_VIRTUAL_CLR_SCR, APPLE_CLR_SCR_OUTPUT, V_PULSE_LONG, !APPLE_CLR_SCR_ACTIVE_VALUE); 76 | } 77 | 78 | 79 | //-------|---------|---------+---------+---------+---------+---------+---------+ 80 | // Above line is 80 columns, and should display completely in the editor. 81 | -------------------------------------------------------------------------------- /firmware/asdf/src/Keymaps/asdf_keymap_apple2_caps.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unfified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_apple2_caps.h 7 | // 8 | // Apple 2 keymaps 9 | // 10 | // Copyright 2019 David Fenyes 11 | // 12 | // This program is free software: you can redistribute it and/or modify it under 13 | // the terms of the GNU General Public License as published by the Free Software 14 | // Foundation, either version 3 of the License, or (at your option) any later 15 | // version. 16 | // 17 | // This program is distributed in the hope that it will be useful, but WITHOUT 18 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 20 | // details. 21 | // 22 | // You should have received a copy of the GNU General Public License along with 23 | // this program. If not, see . 24 | 25 | 26 | // This file supplies the Apple 2 ASCII keyboard keymap. Two variants are provided: 27 | // 28 | // 1) An Upper/Lowercase variant. This variant moves the @ and ^ symbols from 29 | // the P and N keys to the REPEAT key, since the P and N keys need to reserve 30 | // the shifted value for the uppercase characters. Also, the "Power" key 31 | // doubles as a caps-lock key. 32 | // 33 | // 2) A CAPS only keyboard, following the standard Apple II conventions and 34 | // layout, with ^ above the N key and @ above the P key, and a functioning 35 | // REPEAT key. 36 | // 37 | // For both variants, CTRL+RESET is required for a system reset. 38 | 39 | #if !defined(ASDF_KEYMAP_DEFS_APPLE2_CAPS_H) 40 | #define ASDF_KEYMAP_DEFS_APPLE2_CAPS_H 41 | 42 | #define APPLESOFT_KEYBOARD_TEST ASDF_HOOK_USER_9 43 | #define APPLE2_CAPS_ID_MESSAGE ASDF_HOOK_USER_10 44 | 45 | #define APPLE2_PRINT_DELAY 40 // msec 46 | 47 | 48 | #endif /* !defined (ASDF_KEYMAP_DEFS_APPLE2_CAPS_H) */ 49 | 50 | //-------|---------|---------+---------+---------+---------+---------+---------+ 51 | // Above line is 80 columns, and should display completely in the editor. 52 | -------------------------------------------------------------------------------- /firmware/asdf/src/Keymaps/asdf_keymap_apple2_matrix.c: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_apple2.c 7 | // 8 | // set up keymaps for Apple II keyboards 9 | // 10 | // Copyright 2019 David Fenyes 11 | // 12 | // This program is free software: you can redistribute it and/or modify it under 13 | // the terms of the GNU General Public License as published by the Free Software 14 | // Foundation, either version 3 of the License, or (at your option) any later 15 | // version. 16 | // 17 | // This program is distributed in the hope that it will be useful, but WITHOUT 18 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 20 | // details. 21 | // 22 | // You should have received a copy of the GNU General Public License along with 23 | // this program. If not, see . 24 | // 25 | 26 | 27 | #include "asdf_keymap_apple2.h" 28 | #include "asdf_keymap_defs_dipswitch.h" 29 | 30 | // PROCEDURE: 31 | // INPUTS: 32 | // OUTPUTS: 33 | // 34 | // DESCRIPTION: 35 | // 36 | // SIDE EFFECTS: 37 | // 38 | // NOTES: 39 | // 40 | // SCOPE: 41 | // 42 | // COMPLEXITY: 43 | // 44 | 45 | 46 | 47 | // PROCEDURE: apple_add_map 48 | 49 | // INPUTS: asdf_keycode_t (*matrix) - a SOL_NUM_ROWS x SOL_NUM_COLS matrix of 50 | // keycodes for each physical row/column pair 51 | // modifier_index_t modifier index - the modifier state corresponding to 52 | // the keycode matrix 53 | // 54 | // OUTPUTS: none 55 | // DESCRIPTION: Passes the keycode matrix and modifier state through to 56 | // asdf_keymaps_add_map(), along with the row/column dimensions. 57 | // 58 | // SIDE EFFECTS: the matrix is added to the keymap 59 | // 60 | // SCOPE: private 61 | // 62 | // COMPLEXITY: 1 63 | // 64 | static void apple_add_map(const asdf_keycode_t (*matrix)[APPLE_NUM_COLS], 65 | modifier_index_t modifier_index) 66 | { 67 | asdf_keymaps_add_map(&matrix[0][0], modifier_index, (uint8_t) APPLE_NUM_ROWS, 68 | (uint8_t) APPLE_NUM_COLS); 69 | } 70 | 71 | void setup_classic_keymap(void) 72 | { 73 | apple_add_map(apple_plain_map, MOD_PLAIN_MAP); 74 | apple_add_map(apple_caps_map, MOD_CAPS_MAP); 75 | apple_add_map(apple_shift_map, MOD_SHIFT_MAP); 76 | apple_add_map(apple_ctrl_map, MOD_CTRL_MAP); 77 | 78 | asdf_virtual_init(); 79 | 80 | 81 | // Attach the physical POWER LED as the CAPS LED. Assign no triggered 82 | // function, and initialize to initial state of the CAPS logic. The CAPS LED 83 | // will be controlled by the state of the CAPSLOCK logic. 84 | { .virtual_device = VCAPS_LED, .physical_device = APPLE_POWER_LED, .initial_value = 0 }, \ 85 | asdf_virtual_assign(VCAPS_LED, APPLE_POWER_LED, V_NOFUNC, APPLE_POWER_LED_INIT_VALUE); 86 | 87 | // Assign CAPS LED to virtual CAPS LED, and initialize to the INIT value, to 88 | // match the initial CAPSLOCK state. The capslock state code will alter the 89 | // virtual LED according to the state. 90 | asdf_virtual_assign(VCAPS_LED, APPLE_CAPS_LED, V_NOFUNC, APPLE_CAPS_LED_INIT_VALUE); 91 | { .virtual_device = APPLE_VIRTUAL_DISABLED_LED, \ 92 | .physical_device = APPLE_DISABLED_LED, \ 93 | .initial_value = 0 }, \ 94 | 95 | // assign RESET output to the virtual RESET output, configure to produce a short pulse when activated 96 | asdf_virtual_assign(APPLE_VIRTUAL_RESET, APPLE_RESET_OUTPUT, V_PULSE_SHORT, !APPLE_RESET_ACTIVE_VALUE); 97 | 98 | // assign the CLRSCR output to the virtual CLRSCR output, configure to produce a long pulse when activated 99 | asdf_virtual_assign(APPLE_VIRTUAL_CLR_SCR, APPLE_CLR_SCR_OUTPUT, V_PULSE_LONG, !APPLE_CLR_SCR_ACTIVE_VALUE); 100 | } 101 | 102 | 103 | 104 | //-------|---------|---------+---------+---------+---------+---------+---------+ 105 | // Above line is 80 columns, and should display completely in the editor. 106 | 107 | -------------------------------------------------------------------------------- /firmware/asdf/src/Keymaps/asdf_keymap_classic.c: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_classic.c 7 | // 8 | // Implements the "classic" ADM 3A style keymaps 9 | // 10 | // Copyright 2019 David Fenyes 11 | // 12 | // This program is free software: you can redistribute it and/or modify it under 13 | // the terms of the GNU General Public License as published by the Free Software 14 | // Foundation, either version 3 of the License, or (at your option) any later 15 | // version. 16 | // 17 | // This program is distributed in the hope that it will be useful, but WITHOUT 18 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 20 | // details. 21 | // 22 | // You should have received a copy of the GNU General Public License along with 23 | // this program. If not, see . 24 | // 25 | 26 | #include "asdf.h" 27 | #include "asdf_keymaps.h" 28 | #include "asdf_virtual.h" 29 | #include "asdf_modifiers.h" 30 | #include "asdf_print.h" 31 | #include "asdf_keymap_classic.h" 32 | #include "asdf_keymap_classic_add_map.h" 33 | #include "asdf_keymap_apple2_add_map.h" 34 | 35 | void classic_id_message(void) { 36 | asdf_print("[Keymap: classic]\n"); 37 | } 38 | 39 | // PROCEDURE: 40 | // INPUTS: 41 | // OUTPUTS: 42 | // 43 | // DESCRIPTION: 44 | // 45 | // SIDE EFFECTS: 46 | // 47 | // NOTES: 48 | // 49 | // SCOPE: 50 | // 51 | // COMPLEXITY: 52 | // 53 | 54 | void setup_classic_keymap(void) 55 | { 56 | asdf_set_print_delay(ASDF_CLASSIC_PRINT_SPEED); //msec 57 | 58 | classic_add_map(CLASSIC_PLAIN_MAP, MOD_PLAIN_MAP); 59 | classic_add_map(CLASSIC_CAPS_MAP, MOD_CAPS_MAP); 60 | classic_add_map(CLASSIC_SHIFT_MAP, MOD_SHIFT_MAP); 61 | classic_add_map(CLASSIC_CTRL_MAP, MOD_CTRL_MAP); 62 | 63 | asdf_hook_assign(CLASSIC_ID_MESSAGE_HOOK, classic_id_message); 64 | asdf_hook_assign(APPLESOFT_KEYBOARD_TEST_HOOK, applesoft_keyboard_test); 65 | 66 | // Assign power LED to virtual power LED, and initialize to ON 67 | asdf_virtual_assign(CLASSIC_VIRTUAL_POWER_LED, CLASSIC_POWER_LED, V_NOFUNC, CLASSIC_POWER_LED_INIT_VALUE); 68 | 69 | // Assign CAPS LED to virtual CAPS LED, and initialize to the INIT value, to 70 | // match the initial CAPSLOCK state. The capslock state code will alter the 71 | // virtual LED according to the state. 72 | 73 | asdf_virtual_assign(VCAPS_LED, CLASSIC_CAPS_LED, V_NOFUNC, CLASSIC_CAPS_LED_INIT_VALUE); 74 | 75 | // assign RESET output to the virtual RESET output, configure to produce a short pulse when activated 76 | asdf_virtual_assign(CLASSIC_VIRTUAL_RESET, CLASSIC_RESET_OUTPUT, V_PULSE_SHORT, !CLASSIC_RESET_ACTIVE_VALUE); 77 | 78 | // assign the CLRSCR output to the virtual CLRSCR output, configure to produce a long pulse when activated 79 | asdf_virtual_assign(CLASSIC_VIRTUAL_CLR_SCR, CLASSIC_CLR_SCR_OUT, V_PULSE_LONG, !CLASSIC_CLR_SCR_ACTIVE_VALUE); 80 | } 81 | 82 | 83 | //-------|---------|---------+---------+---------+---------+---------+---------+ 84 | // Above line is 80 columns, and should display completely in the editor. 85 | -------------------------------------------------------------------------------- /firmware/asdf/src/Keymaps/asdf_keymap_classic.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unfified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_classic.h 7 | // 8 | // Ascii keymaps 9 | // 10 | // Copyright 2019 David Fenyes 11 | // 12 | // This program is free software: you can redistribute it and/or modify it under 13 | // the terms of the GNU General Public License as published by the Free Software 14 | // Foundation, either version 3 of the License, or (at your option) any later 15 | // version. 16 | // 17 | // This program is distributed in the hope that it will be useful, but WITHOUT 18 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 20 | // details. 21 | // 22 | // You should have received a copy of the GNU General Public License along with 23 | // this program. If not, see . 24 | 25 | 26 | // To use this ascii for a new keymap, edit the keymaps definitions as 27 | // desired. The keymaps are organized from row 0, counting upward, and each row 28 | // includes the columns from 0-NUM_COLS. 29 | // 30 | 31 | #if !defined(ASDF_KEYMAP_DEFS_CLASSIC_H) 32 | #define ASDF_KEYMAP_DEFS_CLASSIC_H 33 | 34 | #include "asdf_hook.h" 35 | 36 | // Edit the number of rows and columns used in this map. If the number is less 37 | // than the maxium, the unused elements will be initialized to 0. 38 | 39 | #define CLASSIC_NUM_ROWS 9 // DIP switches are row 8 (zero based) 40 | #define CLASSIC_NUM_COLS 8 41 | 42 | #define CLASSIC_ACTION_BREAK ACTION_NOTHING 43 | 44 | #define CLASSIC_VIRTUAL_RESET VOUT1 45 | #define CLASSIC_ACTION_RESET ACTION_VOUT1 46 | #define CLASSIC_RESET_OUTPUT PHYSICAL_OUT3_OPEN_HI 47 | #define CLASSIC_RESET_ACTIVE_VALUE 0 48 | 49 | #define CLASSIC_VIRTUAL_CLR_SCR VOUT2 50 | #define CLASSIC_ACTION_CLEAR ACTION_VOUT2 51 | #define CLASSIC_CLR_SCR_OUT PHYSICAL_OUT1_OPEN_LO 52 | #define CLASSIC_CLR_SCR_ACTIVE_VALUE 1 53 | 54 | #define CLASSIC_VIRTUAL_POWER_LED VLED1 55 | #define CLASSIC_POWER_LED PHYSICAL_LED1 56 | #define CLASSIC_POWER_LED_INIT_VALUE 1 57 | 58 | #define CLASSIC_CAPS_LED PHYSICAL_LED3 59 | #define CLASSIC_CAPS_LED_INIT_VALUE 0 60 | 61 | #define CLASSIC_ID_MESSAGE_HOOK ASDF_HOOK_USER_10 62 | #define APPLESOFT_KEYBOARD_TEST_HOOK ASDF_HOOK_USER_9 63 | 64 | #define ASDF_CLASSIC_PRINT_SPEED 40 65 | 66 | #endif /* !defined (ASDF_KEYMAP_DEFS_ASCII_H) */ 67 | 68 | //-------|---------|---------+---------+---------+---------+---------+---------+ 69 | // Above line is 80 columns, and should display completely in the editor. 70 | -------------------------------------------------------------------------------- /firmware/asdf/src/Keymaps/asdf_keymap_classic_add_map.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unfified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_classic_add_map.h 7 | // 8 | // defines keymap matrices and add_map() function for classic layouts 9 | // 10 | // Copyright 2019 David Fenyes 11 | // 12 | // This program is free software: you can redistribute it and/or modify it under 13 | // the terms of the GNU General Public License as published by the Free Software 14 | // Foundation, either version 3 of the License, or (at your option) any later 15 | // version. 16 | // 17 | // This program is distributed in the hope that it will be useful, but WITHOUT 18 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 20 | // details. 21 | // 22 | // You should have received a copy of the GNU General Public License along with 23 | // this program. If not, see . 24 | 25 | 26 | // To use this ascii for a new keymap, edit the keymaps definitions as 27 | // desired. The keymaps are organized from row 0, counting upward, and each row 28 | // includes the columns from 0-NUM_COLS. 29 | // 30 | 31 | #if !defined(ASDF_KEYMAP_CLASSIC_ADD_MAP_H) 32 | #define ASDF_KEYMAP_CLASSIC_ADD_MAP_H 33 | 34 | #include "asdf_modifiers.h" 35 | 36 | typedef enum { 37 | CLASSIC_PLAIN_MAP, 38 | CLASSIC_CAPS_MAP, 39 | CLASSIC_SHIFT_MAP, 40 | CLASSIC_CTRL_MAP, 41 | } classic_map_index_t; 42 | 43 | 44 | // function prototypes 45 | void classic_add_map(const classic_map_index_t map_index, modifier_index_t modifier_index); 46 | 47 | #endif /* !defined (ASDF_KEYMAP_CLASSIC_ADD_MAP_H) */ 48 | 49 | //-------|---------|---------+---------+---------+---------+---------+---------+ 50 | // Above line is 80 columns, and should display completely in the editor. 51 | -------------------------------------------------------------------------------- /firmware/asdf/src/Keymaps/asdf_keymap_classic_caps.c: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_classic.c 7 | // 8 | // Implements the "classic" ADM 3A style keymaps 9 | // 10 | // Copyright 2019 David Fenyes 11 | // 12 | // This program is free software: you can redistribute it and/or modify it under 13 | // the terms of the GNU General Public License as published by the Free Software 14 | // Foundation, either version 3 of the License, or (at your option) any later 15 | // version. 16 | // 17 | // This program is distributed in the hope that it will be useful, but WITHOUT 18 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 20 | // details. 21 | // 22 | // You should have received a copy of the GNU General Public License along with 23 | // this program. If not, see . 24 | // 25 | 26 | #include "asdf.h" 27 | #include "asdf_keymaps.h" 28 | #include "asdf_print.h" 29 | #include "asdf_virtual.h" 30 | #include "asdf_modifiers.h" 31 | #include "asdf_keymap_classic.h" 32 | #include "asdf_keymap_classic_add_map.h" 33 | #include "asdf_keymap_apple2_add_map.h" 34 | 35 | 36 | 37 | void classic_caps_id_message(void) { 38 | asdf_print("[Keymap: classic]\n"); 39 | } 40 | 41 | 42 | // PROCEDURE: 43 | // INPUTS: 44 | // OUTPUTS: 45 | // 46 | // DESCRIPTION: 47 | // 48 | // SIDE EFFECTS: 49 | // 50 | // NOTES: 51 | // 52 | // SCOPE: 53 | // 54 | // COMPLEXITY: 55 | // 56 | 57 | void setup_classic_caps_keymap(void) 58 | { 59 | asdf_set_print_delay(ASDF_CLASSIC_PRINT_SPEED); 60 | 61 | // for the ALL CAPS keymap, the "plain" mode is the same as "all caps" mode: 62 | classic_add_map(CLASSIC_CAPS_MAP, MOD_PLAIN_MAP); 63 | classic_add_map(CLASSIC_CAPS_MAP, MOD_CAPS_MAP); 64 | classic_add_map(CLASSIC_SHIFT_MAP, MOD_SHIFT_MAP); 65 | classic_add_map(CLASSIC_CTRL_MAP, MOD_CTRL_MAP); 66 | 67 | asdf_hook_assign(CLASSIC_ID_MESSAGE_HOOK, classic_caps_id_message); 68 | asdf_hook_assign(APPLESOFT_KEYBOARD_TEST_HOOK, applesoft_keyboard_test); 69 | 70 | // Assign power LED to virtual power LED, and initialize to ON 71 | asdf_virtual_assign(CLASSIC_VIRTUAL_POWER_LED, CLASSIC_POWER_LED, V_NOFUNC, CLASSIC_POWER_LED_INIT_VALUE); 72 | 73 | // Because the virtual power LED never changes, also assign the CAPSLOCK 74 | // physical LED to the virtual Power LED, and intialize to OFF (or can change 75 | // to ON depending on preference) 76 | asdf_virtual_assign(CLASSIC_VIRTUAL_POWER_LED, CLASSIC_CAPS_LED, V_NOFUNC, CLASSIC_CAPS_LED_INIT_VALUE); 77 | 78 | // assign RESET output to the virtual RESET output, configure to produce a short pulse when activated 79 | asdf_virtual_assign(CLASSIC_VIRTUAL_RESET, CLASSIC_RESET_OUTPUT, V_PULSE_SHORT, !CLASSIC_RESET_ACTIVE_VALUE); 80 | 81 | // assign the CLRSCR output to the virtual CLRSCR output, configure to produce a long pulse when activated 82 | asdf_virtual_assign(CLASSIC_VIRTUAL_CLR_SCR, CLASSIC_CLR_SCR_OUT, V_PULSE_LONG, !CLASSIC_CLR_SCR_ACTIVE_VALUE); 83 | } 84 | 85 | 86 | //-------|---------|---------+---------+---------+---------+---------+---------+ 87 | // Above line is 80 columns, and should display completely in the editor. 88 | -------------------------------------------------------------------------------- /firmware/asdf/src/Keymaps/asdf_keymap_defs_dipswitch.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unfified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_defs_dipswitch.h 7 | // 8 | // Contains defitions for DIP switch settings shared by all keymaps. 9 | // 10 | // Copyright 2019 David Fenyes 11 | // This program is free software: you can redistribute it and/or modify it under 12 | // the terms of the GNU General Public License as published by the Free Software 13 | // Foundation, either version 3 of the License, or (at your option) any later 14 | // version. 15 | // 16 | // This program is distributed in the hope that it will be useful, but WITHOUT 17 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 19 | // details. 20 | // 21 | // You should have received a copy of the GNU General Public License along with 22 | // this program. If not, see . 23 | // 24 | 25 | #if !defined (DEPS_DIPSWITCH_H) 26 | #define DEPS_DIPSWITCH_H 27 | 28 | #define ASDF_KEYMAP_DIP_SWITCHES \ 29 | [ASDF_ARCH_DIPSWITCH_ROW] = { \ 30 | [0] = ACTION_MAPSEL_0, \ 31 | [1] = ACTION_MAPSEL_1, \ 32 | [2] = ACTION_MAPSEL_2, \ 33 | [3] = ACTION_MAPSEL_3, \ 34 | [5] = ACTION_FN_11, \ 35 | [6] = ACTION_STROBE_POLARITY_SELECT, \ 36 | [7] = ACTION_AUTOREPEAT_SELECT, \ 37 | } 38 | 39 | // 40 | // Device and peripheral definitions, comments should include use of devices. 41 | // Please 42 | // 43 | 44 | #endif /* !defined (DEPS_DIPSWITCH_H) */ 45 | 46 | //-------|---------|---------+---------+---------+---------+---------+---------+ 47 | // Above line is 80 columns, and should display completely in the editor. 48 | -------------------------------------------------------------------------------- /firmware/asdf/src/Templates/function.c: -------------------------------------------------------------------------------- 1 | // PROCEDURE: 2 | // INPUTS: 3 | // OUTPUTS: 4 | // 5 | // DESCRIPTION: 6 | // 7 | // SIDE EFFECTS: 8 | // 9 | // NOTES: 10 | // 11 | // SCOPE: 12 | // 13 | // COMPLEXITY: 14 | // 15 | -------------------------------------------------------------------------------- /firmware/asdf/src/Templates/template.c: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // .c 7 | // 8 | // Copyright 2019 David Fenyes 9 | // 10 | // This program is free software: you can redistribute it and/or modify it under 11 | // the terms of the GNU General Public License as published by the Free Software 12 | // Foundation, either version 3 of the License, or (at your option) any later 13 | // version. 14 | // 15 | // This program is distributed in the hope that it will be useful, but WITHOUT 16 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 17 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 18 | // details. 19 | // 20 | // You should have received a copy of the GNU General Public License along with 21 | // this program. If not, see . 22 | // 23 | 24 | 25 | // Wiring Information: 26 | // Chip: {Microcontroller type and version} 27 | // 28 | // Example: 29 | // PIN NAME FUNCTION 30 | // 3 AN1 ADC INPUT: Line sense analog input 31 | // 32 | // 6 A4 INPUT: (T0CK) COUNT DOWN from quadrature decoder. 33 | // configured to count on rising edge, synced with xtal 34 | // 35 | 36 | 37 | // 38 | // Headers 39 | // 40 | 41 | #include 42 | 43 | 44 | 45 | // 46 | // Global Variable declarations: Use very sparingly. Used for communication 47 | // with ISR's. Exceptions should be documented. 48 | // 49 | 50 | // Examples: 51 | 52 | // run_clock_thread (global uns 8) when this is set to TRUE (by the 53 | // clock_tick() ISR every 20 ms), the main loop performs certain 54 | // actions, and resets the value to FALSE (see main loop comments) 55 | // 56 | uint8 send_count = FALSE; 57 | 58 | 59 | // 60 | // ISR routines 61 | // 62 | 63 | // PROCEDURE: 64 | // INPUTS: 65 | // OUTPUTS: 66 | // 67 | // DESCRIPTION: 68 | // 69 | // SIDE EFFECTS: 70 | // 71 | // NOTES: 72 | // 73 | // COMPLEXITY: 74 | // 75 | 76 | // 77 | // Regular functions 78 | // 79 | 80 | // PROCEDURE: 81 | // INPUTS: 82 | // OUTPUTS: 83 | // 84 | // DESCRIPTION: 85 | // 86 | // SIDE EFFECTS: 87 | // 88 | // NOTES: 89 | // 90 | // SCOPE: 91 | // 92 | // COMPLEXITY: 93 | // 94 | 95 | 96 | 97 | 98 | 99 | // PROCEDURE: main() 100 | // 101 | // Main program loop; invoked at processor startup. 102 | // 103 | 104 | main() 105 | { 106 | // INITIALIZATION SECTION 107 | 108 | cold_start: 109 | 110 | 111 | // re-initialize variables and re-enter control loop, when the "R" command 112 | // is received 113 | 114 | warm_start: 115 | 116 | // END OF INITIALIZATION SECTION 117 | 118 | // Main Section: 119 | 120 | } 121 | 122 | 123 | //-------|---------|---------+---------+---------+---------+---------+---------+ 124 | // Above line is 80 columns, and should display completely in the editor. 125 | 126 | -------------------------------------------------------------------------------- /firmware/asdf/src/Templates/template.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unfified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // .h 7 | // 8 | // Copyright 2019 David Fenyes 9 | // This program is free software: you can redistribute it and/or modify it under 10 | // the terms of the GNU General Public License as published by the Free Software 11 | // Foundation, either version 3 of the License, or (at your option) any later 12 | // version. 13 | // 14 | // This program is distributed in the hope that it will be useful, but WITHOUT 15 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 16 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 | // details. 18 | // 19 | // You should have received a copy of the GNU General Public License along with 20 | // this program. If not, see . 21 | // 22 | 23 | #if !defined (FILENAME_H) 24 | #define FILENAME_H 25 | 26 | // 27 | // Headers 28 | // 29 | 30 | 31 | 32 | // 33 | // Device and peripheral definitions, comments should include use of devices. 34 | // Please 35 | // 36 | 37 | #endif /* !defined (FILENAME_H) */ 38 | 39 | //-------|---------|---------+---------+---------+---------+---------+---------+ 40 | // Above line is 80 columns, and should display completely in the editor. 41 | 42 | -------------------------------------------------------------------------------- /firmware/asdf/src/_clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Mozilla 3 | AlignAfterOpenBracket: Align 4 | AlignOperands: 'true' 5 | AlignTrailingComments: 'true' 6 | AllowAllParametersOfDeclarationOnNextLine: 'false' 7 | AllowShortBlocksOnASingleLine: 'false' 8 | AllowShortCaseLabelsOnASingleLine: 'true' 9 | AllowShortFunctionsOnASingleLine: Empty 10 | AllowShortIfStatementsOnASingleLine: 'false' 11 | AllowShortLoopsOnASingleLine: 'true' 12 | AlwaysBreakAfterDefinitionReturnType: None 13 | AlwaysBreakAfterReturnType: None 14 | AlwaysBreakBeforeMultilineStrings: 'true' 15 | BinPackArguments: 'true' 16 | BinPackParameters: 'true' 17 | BreakBeforeBinaryOperators: NonAssignment 18 | BreakBeforeBraces: Stroustrup 19 | ColumnLimit: '100' 20 | ConstructorInitializerIndentWidth: '2' 21 | ContinuationIndentWidth: '2' 22 | DerivePointerAlignment: 'false' 23 | DisableFormat: 'false' 24 | IncludeBlocks: Preserve 25 | IndentCaseLabels: 'true' 26 | IndentPPDirectives: None 27 | IndentWidth: '2' 28 | IndentWrappedFunctionNames: 'false' 29 | KeepEmptyLinesAtTheStartOfBlocks: 'true' 30 | Language: Cpp 31 | MaxEmptyLinesToKeep: '2' 32 | PointerAlignment: Right 33 | ReflowComments: 'true' 34 | SortIncludes: 'false' 35 | SpaceAfterCStyleCast: 'true' 36 | SpaceBeforeAssignmentOperators: 'true' 37 | SpaceBeforeParens: ControlStatements 38 | SpaceInEmptyParentheses: 'false' 39 | SpacesBeforeTrailingComments: '1' 40 | SpacesInCStyleCastParentheses: 'false' 41 | SpacesInParentheses: 'false' 42 | SpacesInSquareBrackets: 'false' 43 | TabWidth: '8' 44 | UseTab: Never 45 | 46 | ... 47 | -------------------------------------------------------------------------------- /firmware/asdf/src/asdf_buffer.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_buffer.h 7 | // 8 | // Contains definitions and prototypes for the asdf keycode output buffer. 9 | // 10 | // Copyright 2019 David Fenyes 11 | // 12 | // This program is free software: you can redistribute it and/or modify it under 13 | // the terms of the GNU General Public License as published by the Free Software 14 | // Foundation, either version 3 of the License, or (at your option) any later 15 | // version. 16 | // 17 | // This program is distributed in the hope that it will be useful, but WITHOUT 18 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 20 | // details. 21 | // 22 | // You should have received a copy of the GNU General Public License along with 23 | // this program. If not, see . 24 | // 25 | 26 | #if !defined(ASDF_BUFFER_H) 27 | #define ASDF_BUFFER_H 28 | 29 | // ASDF_BUFFER_POOL_SIZE is defined in asdf_config.h 30 | #include "asdf_config.h" 31 | 32 | // Used to designate an invalid buffer. 33 | #define ASDF_BUFFER_INVALID -1 34 | 35 | // Setting the number of handles to 1 will work if only one buffer is requrired, 36 | // and will save a few bytes of RAM. But the test code needs at least 2 buffer 37 | // handles to test the module, so we leave it at 2. 38 | #define ASDF_BUFFER_NUM_HANDLES 4 39 | 40 | 41 | // The buffer handle type should be able to handle the expected number of buffers. 42 | typedef int8_t asdf_buffer_handle_t; 43 | 44 | // PROCEDURE: asdf_buffer_init 45 | // INPUTS: none 46 | // OUTPUTS: none 47 | // DESCRIPTION: Initialize the buffer pool and handles 48 | void asdf_buffer_init(void); 49 | 50 | // PROCEDURE: asdf_buffer_new 51 | // INPUTS: (uint16_t) size: size of the buffer to allocate. 52 | // OUTPUTS: returns (asdf_buffer_handle_t) handle to identify the buffer allocated from the 53 | // pool. 54 | // DESCRIPTION: Receives a request to allocate a fixed-size buffer from the 55 | // pool. If there is enough room in the buffer pool, and if a buffer handle is 56 | // available, then allocate space from the pool, initialize the next available 57 | // buffer struct, and return the handle. 58 | asdf_buffer_handle_t asdf_buffer_new(int16_t size); 59 | 60 | // PROCEDURE: asdf_buffer_put 61 | // INPUTS:(asdf_buffer_t) buffer_handle: pointer to the buffer struct. 62 | // (asdf_keycode_t) code: code to be added to the queue. 63 | // OUTPUTS: None 64 | // DESCRIPTION: Add the keycode to the head of the output buffer. If the buffer 65 | // is full, quietly drop the keycode. 66 | void asdf_buffer_put(asdf_buffer_handle_t handle, asdf_keycode_t code); 67 | 68 | // PROCEDURE: asdf_buffer_get 69 | // INPUTS: None 70 | // OUTPUTS: returns next code in the buffer. 71 | // DESCRIPTION: Gets the next queued code in the output buffer and return the 72 | // value. 73 | asdf_keycode_t asdf_buffer_get(asdf_buffer_handle_t handle); 74 | 75 | #endif // !defined (ASDF_BUFFER_H) 76 | 77 | //-------|---------|---------+---------+---------+---------+---------+---------+ 78 | // Above line is 80 columns, and should display completely in the editor. 79 | -------------------------------------------------------------------------------- /firmware/asdf/src/asdf_config.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- 2 | // 3 | // Universal Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_config.h 7 | // 8 | // This file gathers configuration parameters related to the user-detectable 9 | // keyboard experience. For example, put key debounce times, repeat rates, 10 | // buffer sized, baud rates, etc. here. Details such as processor clock speed, 11 | // etc. should go in the architecture-dependent files. System details such as 12 | // number of buffer handles, etc. should go with the appropriate module, but 13 | // certain buffer sized may go here if they can affect the user experience (such 14 | // as how long a macro can be). 15 | // 16 | // Copyright 2019 David Fenyes 17 | // This program is free software: you can redistribute it and/or modify it under 18 | // the terms of the GNU General Public License as published by the Free Software 19 | // Foundation, either version 3 of the License, or (at your option) any later 20 | // version. 21 | // 22 | // This program is distributed in the hope that it will be useful, but WITHOUT 23 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 24 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 25 | // details. 26 | // 27 | // You should have received a copy of the GNU General Public License along with 28 | // this program. If not, see . 29 | // 30 | 31 | #if !defined(CONFIG_H) 32 | #define CONFIG_H 33 | 34 | #define ASDF_POSITIVE_POLARITY 0 35 | #define ASDF_NEGATIVE_POLARITY (~ASDF_POSITIVE_POLARITY) 36 | 37 | // data polarity is positive (inactive is low, active is high) 38 | #define ASDF_DEFAULT_DATA_POLARITY ASDF_POSITIVE_POLARITY 39 | 40 | // Strobe polarity is positive (inactive is low, active is high) 41 | #define ASDF_DEFAULT_STROBE_POLARITY ASDF_POSITIVE_POLARITY 42 | 43 | // RESET output polarity is negative (inactive is high, active is low) 44 | #define ASDF_DEFAULT_RESET_POLARITY ASDF_NEGATIVE_POLARITY 45 | 46 | // SCREEN_CLEAR output polarity is positive (inactive is low, active is high) 47 | #define ASDF_DEFAULT_SCREEN_CLEAR_POLARITY ASDF_POSITIVE_POLARITY 48 | 49 | 50 | // Data structure sizes: 51 | 52 | // size of the keycode output buffer. 53 | #define ASDF_KEYCODE_BUFFER_SIZE 16 54 | 55 | #define ASDF_MESSAGE_BUFFER_SIZE 128 56 | 57 | #define ASDF_BUFFER_POOL_SIZE (ASDF_MESSAGE_BUFFER_SIZE + ASDF_KEYCODE_BUFFER_SIZE) 58 | 59 | // key debounce period (in msec) 60 | #define ASDF_DEBOUNCE_TIME_MS 10 61 | 62 | // Autorepeat default behavior. Set to REPEAT_AUTO for default autorepeat. 63 | // Set to REPEAT_OFF for default no autorepeat by default. 64 | #define ASDF_DEFAULT_REPEAT_STATE REPEAT_AUTO 65 | 66 | // time to wait before sending consecutive message characters to the host, to 67 | // ensure that messages are intact on hosts that poll the port without 68 | // buffering. (in msec) 69 | #define ASDF_MESSAGE_CHARACTER_DELAY 16 //msec 70 | 71 | // time to hold down a key in milliseconds before autorepeat starts 72 | #define ASDF_AUTOREPEAT_TIME_MS 525 // 525 msec. 73 | 74 | // time between repeats of a character with repeat key held, or in autorepeat (milliseconds) 75 | #define ASDF_REPEAT_TIME_MS (1000 / 15) // l5 characters per sec. 76 | 77 | // duration of keyboard output pulses (RESET, SCREEN CLEAR, BREAK, etc.) 78 | #define ASDF_PULSE_DELAY_SHORT_US 10 79 | 80 | // duration of keyboard output pulses (RESET, SCREEN CLEAR, BREAK, etc.) 81 | #define ASDF_PULSE_DELAY_LONG_MS 50 82 | 83 | // DEFAULT value of keyboard outputs 84 | #define ASDF_VIRTUAL_OUT_DEFAULT_VALUE 1 // High if not used. 85 | 86 | // DEFAULT key scan routine 87 | #define ASDF_DEFAULT_KEY_SCANNER asdf_keyscan 88 | 89 | #endif /* !defined (CONFIG_H) */ 90 | 91 | //-------|---------|---------+---------+---------+---------+---------+---------+ 92 | // Above line is 80 columns, and should display completely in the editor. 93 | -------------------------------------------------------------------------------- /firmware/asdf/src/asdf_hook.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unfified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_hook.h 7 | // 8 | // Definitions and prototypes for configurable function hooks 9 | // 10 | // Copyright 2019 David Fenyes 11 | // This program is free software: you can redistribute it and/or modify it under 12 | // the terms of the GNU General Public License as published by the Free Software 13 | // Foundation, either version 3 of the License, or (at your option) any later 14 | // version. 15 | // 16 | // This program is distributed in the hope that it will be useful, but WITHOUT 17 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 19 | // details. 20 | // 21 | // You should have received a copy of the GNU General Public License along with 22 | // this program. If not, see . 23 | // 24 | 25 | #if !defined(ASDF_HOOKS_H) 26 | #define ASDF_HOOKS_H 27 | 28 | // These are "hooks" output identifiers that can be mapped to the real outputs using 29 | // keymap initializer commands. 30 | typedef enum { 31 | ASDF_HOOK_NULL, 32 | ASDF_HOOK_KEY_SCANNER, 33 | ASDF_HOOK_ROW_SCANNER, 34 | ASDF_HOOK_OUTPUT, 35 | ASDF_HOOK_EACH_SCAN, 36 | ASDF_HOOK_USER_1, 37 | ASDF_HOOK_USER_2, 38 | ASDF_HOOK_USER_3, 39 | ASDF_HOOK_USER_4, 40 | ASDF_HOOK_USER_5, 41 | ASDF_HOOK_USER_6, 42 | ASDF_HOOK_USER_7, 43 | ASDF_HOOK_USER_8, 44 | ASDF_HOOK_USER_9, 45 | ASDF_HOOK_USER_10, 46 | ASDF_HOOK_USER_11, 47 | ASDF_NUM_HOOKS, 48 | } asdf_hook_id_t; 49 | 50 | #define ASDF_HOOK_KEYMAP_SETUP ASDF_NUM_HOOKS 51 | 52 | // Each keymap specifies an array of initializer structs to configure function hooks, 53 | // specifying the hook ID and mapped function. 54 | 55 | typedef void (*asdf_hook_function_t)(void); 56 | 57 | typedef struct { 58 | asdf_hook_id_t hook_id; 59 | asdf_hook_function_t hook_func; 60 | } asdf_hook_initializer_t; 61 | 62 | 63 | // PROCEDURE: asdf_hook_execute 64 | // INPUTS: (asdf_hook_id_t) hook_id: The hook for which to execute attache functions. 65 | // OUTPUTS: none 66 | // DESCRIPTION: if the hook ID is valid, then execute the function attached to the hook. 67 | // SIDE EFFECTS: variable depending on the hooks. 68 | void asdf_hook_execute(asdf_hook_id_t hook_id); 69 | 70 | // PROCEDURE: asdf_hook_get 71 | // INPUTS: (asdf_hook_id_t) hook_id: The hook for which to retrieve the attached 72 | // function. 73 | // OUTPUTS: none 74 | // DESCRIPTION: if the hook ID is valid, then retrieve the function attached to the hook. 75 | // SIDE EFFECTS: none 76 | asdf_hook_function_t asdf_hook_get(asdf_hook_id_t hook_id); 77 | 78 | // PROCEDURE: asdf_hook_init 79 | // INPUTS: none 80 | // OUTPUTS: none 81 | // DESCRIPTION: Initializes function hooks for the selected keymap. If a 82 | // function is assigned to the "KEYMAP_SETUP" hook, then execute the function. 83 | // There is no actual slot where KEYMAP_SETUP functions are stored. 84 | void asdf_hook_init(void); 85 | 86 | // PROCEDURE: asdf_hook_assign 87 | // INPUTS: (asdf_hook_id_t) hook_id: The hook for which to execute attache functions. 88 | // (asdf_hook_function_t) func: function to be attached to the hook. 89 | // OUTPUTS: none 90 | // DESCRIPTION: If the hook ID is valid, map the function to the hook ID. 91 | // Ignore if not valid. 92 | void asdf_hook_assign(asdf_hook_id_t hook_id, asdf_hook_function_t func); 93 | 94 | 95 | #endif /* !defined (ASDF_HOOKS_H) */ 96 | 97 | //-------|---------|---------+---------+---------+---------+---------+---------+ 98 | // Above line is 80 columns, and should display completely in the editor. 99 | -------------------------------------------------------------------------------- /firmware/asdf/src/asdf_keymap_setup.c.in: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_table.c 7 | // 8 | // initialize keymap setup function table 9 | // 10 | // *** AUTO-generated file. DO NOT EDIT. *** 11 | // *** To modify template, edit $ROOT/src/Keymaps/asdf_keymap_table.c.in *** 12 | // *** To modify keymap list, edit $ROOT/keymap_list.cmake 13 | // 14 | // Copyright 2019 David Fenyes 15 | // 16 | // This program is free software: you can redistribute it and/or modify it under 17 | // the terms of the GNU General Public License as published by the Free Software 18 | // Foundation, either version 3 of the License, or (at your option) any later 19 | // version. 20 | // 21 | // This program is distributed in the hope that it will be useful, but WITHOUT 22 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 23 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 24 | // details. 25 | // 26 | // You should have received a copy of the GNU General Public License along with 27 | // this program. If not, see . 28 | // 29 | 30 | #include 31 | 32 | @keymap_declarations@ 33 | 34 | // PROCEDURE: asdf_keymap_setup 35 | // 36 | // INPUTS: (uint8_t) index - index of the keymap setup function to call 37 | // OUTPUTS: none 38 | //// 39 | // DESCRIPTION: This function calls the keymap setup function specified 40 | // by the index. 41 | // 42 | // SIDE EFFECTS: See Description 43 | // 44 | // NOTES: This function is necessary because functions defined in external 45 | // modules are not considered compile-time constants by the C99 standard, so the 46 | // array cannot be initialized with a compile-time declaration. 47 | // 48 | // SCOPE: public 49 | // 50 | // COMPLEXITY: 1 51 | // 52 | void asdf_keymap_setup(uint8_t index) { 53 | switch(index) { 54 | default: @keymap_table@ 55 | } 56 | } 57 | 58 | // PROCEDURE: asdf_keymap_valid 59 | // 60 | // INPUTS: (uint8_t) index - index of the keymap setup function to check 61 | // OUTPUTS: (uintu_t) returns TRUE (nonzero) if valid, FALSE (0) otherwise 62 | // 63 | // DESCRIPTION: This function returns TRUE if the index corresponds to 64 | // a valid keymap. 65 | // 66 | // SIDE EFFECTS: none 67 | // 68 | // NOTES: 69 | // 70 | // SCOPE: public 71 | // 72 | // COMPLEXITY: 1 73 | // 74 | uint8_t asdf_keymap_valid(uint8_t index) { 75 | uint8_t valid = 0; 76 | 77 | switch(index) { @keymap_valid@ 78 | valid = 1; 79 | break; 80 | 81 | default: 82 | valid = 0; 83 | break; 84 | } 85 | 86 | return valid; 87 | } 88 | 89 | 90 | //-------|---------|---------+---------+---------+---------+---------+---------+ 91 | // Above line is 80 columns, and should display completely in the editor. 92 | 93 | -------------------------------------------------------------------------------- /firmware/asdf/src/asdf_keymap_setup.h.in: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_table.c 7 | // 8 | // initialize keymap setup function table 9 | // 10 | // *** AUTO-generated file. DO NOT EDIT. *** 11 | // *** To modify template, edit $ROOT/src/Keymaps/asdf_keymap_table.c.in *** 12 | // *** To modify keymap list, edit $ROOT/keymap_list.cmake 13 | // 14 | // Copyright 2019 David Fenyes 15 | // 16 | // This program is free software: you can redistribute it and/or modify it under 17 | // the terms of the GNU General Public License as published by the Free Software 18 | // Foundation, either version 3 of the License, or (at your option) any later 19 | // version. 20 | // 21 | // This program is distributed in the hope that it will be useful, but WITHOUT 22 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 23 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 24 | // details. 25 | // 26 | // You should have received a copy of the GNU General Public License along with 27 | // this program. If not, see . 28 | // 29 | 30 | // PROCEDURE: asdf_keymap_setup 31 | // INPUTS: (uint8_t) index - index of the keymap setup function to call 32 | // OUTPUTS: none 33 | // DESCRIPTION: This function calls the keymap setup function specified 34 | // by the index. 35 | // SIDE EFFECTS: See Description 36 | void asdf_keymap_setup(uint8_t index); 37 | 38 | // PROCEDURE: asdf_keymap_valid 39 | // INPUTS: (uint8_t) index - index of the keymap setup function to check 40 | // OUTPUTS: (uintu_t) returns TRUE (nonzero) if valid, FALSE (0) otherwise 41 | // DESCRIPTION: This function returns TRUE if the index corresponds to 42 | // a valid keymap. 43 | uint8_t asdf_keymap_valid(uint8_t index); 44 | 45 | //-------|---------|---------+---------+---------+---------+---------+---------+ 46 | // Above line is 80 columns, and should display completely in the editor. 47 | 48 | -------------------------------------------------------------------------------- /firmware/asdf/src/asdf_print.c: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // .c 7 | // 8 | // Copyright 2019 David Fenyes 9 | // 10 | // This program is free software: you can redistribute it and/or modify it under 11 | // the terms of the GNU General Public License as published by the Free Software 12 | // Foundation, either version 3 of the License, or (at your option) any later 13 | // version. 14 | // 15 | // This program is distributed in the hope that it will be useful, but WITHOUT 16 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 17 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 18 | // details. 19 | // 20 | // You should have received a copy of the GNU General Public License along with 21 | // this program. If not, see . 22 | // 23 | 24 | 25 | // 26 | // Headers 27 | // 28 | #include 29 | #include 30 | #include "asdf.h" 31 | 32 | 33 | static FILE ascii_port = FDEV_SETUP_STREAM(asdf_putc, NULL, 34 | _FDEV_SETUP_WRITE); 35 | 36 | // 37 | // Regular functions 38 | // 39 | 40 | // PROCEDURE: asdf_print 41 | // INPUTS: (*char) fmt - format string 42 | // va_arglist - list of args for fmt string 43 | // OUTPUTS: none 44 | // 45 | // DESCRIPTION: output to ascii output port using vfprintf() 46 | // 47 | // SIDE EFFECTS: see DESCRIPTION 48 | // 49 | // NOTES: 50 | // 51 | // SCOPE: public 52 | // 53 | // COMPLEXITY: 1 54 | // 55 | void asdf_print(char *fmt, ...) 56 | { 57 | va_list arg_ptr; 58 | 59 | va_start(arg_ptr, fmt); 60 | vfprintf(&ascii_port, fmt, arg_ptr); 61 | va_end(arg_ptr); 62 | } 63 | 64 | 65 | 66 | //-------|---------|---------+---------+---------+---------+---------+---------+ 67 | // Above line is 80 columns, and should display completely in the editor. 68 | 69 | -------------------------------------------------------------------------------- /firmware/asdf/src/asdf_print.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unfified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_print.h 7 | // 8 | // Copyright 2019 David Fenyes 9 | // This program is free software: you can redistribute it and/or modify it under 10 | // the terms of the GNU General Public License as published by the Free Software 11 | // Foundation, either version 3 of the License, or (at your option) any later 12 | // version. 13 | // 14 | // This program is distributed in the hope that it will be useful, but WITHOUT 15 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 16 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 | // details. 18 | // 19 | // You should have received a copy of the GNU General Public License along with 20 | // this program. If not, see . 21 | // 22 | 23 | #if !defined (ASDF_PRINT_H) 24 | #define ASDF_PRINT_H 25 | 26 | //-------|---------|---------+---------+---------+---------+---------+---------+ 27 | // Above line is 80 columns, and should display completely in the editor. 28 | 29 | // PROCEDURE: asdf_print 30 | // INPUTS: (*char) fmt - format string 31 | // va_arglist - list of args for fmt string 32 | // OUTPUTS: none 33 | // DESCRIPTION: output to ascii output port using vfprintf() 34 | // COMPLEXITY: 1 35 | void asdf_print(const char *fmt, ...); 36 | 37 | #endif /* !defined (ASDF_PRINT_H) */ 38 | -------------------------------------------------------------------------------- /firmware/asdf/src/asdf_repeat.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unfified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_repeat.h 7 | // 8 | // Copyright 2019 David Fenyes 9 | // 10 | // This program is free software: you can redistribute it and/or modify it 11 | // under the terms of the GNU General Public License as published by the Free 12 | // Software Foundation, either version 3 of the License, or (at your option) any 13 | // later version. 14 | // 15 | // This program is distributed in the hope that it will be useful, but WITHOUT 16 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 17 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 18 | // details. 19 | // 20 | // You should have received a copy of the GNU General Public License along with 21 | // this program. If not, see . 22 | // 23 | // 24 | 25 | #if !defined(ASDF_REPEAT_H) 26 | #define ASDF_REPEAT_H 27 | 28 | #include "asdf_config.h" 29 | 30 | // PROCEDURE: asdf_repeat_init 31 | // INPUTS: none 32 | // OUTPUTS: none 33 | // DESCRIPTION: Initialize the repeat state state machine 34 | void asdf_repeat_init(void); 35 | 36 | // PROCEDURE: asdf_repeast_reset_count 37 | // INPUTS: none 38 | // OUTPUTS: none 39 | // DESCRIPTION: resets the repeat counter for the current key, to begin a new 40 | // repeat cycle. Resest is based on repeat state (no repeat, autorepeat, normal repeat). 41 | void asdf_repeat_reset_count(void); 42 | 43 | // PROCEDURE: asdf_repeat_auto_off 44 | // INPUTS: none 45 | // OUTPUTS: none 46 | // DESCRIPTION: Turns Autorepeat mode off 47 | void asdf_repeat_auto_off(void); 48 | 49 | // PROCEDURE: asdf_repeat_auto_on 50 | // INPUTS: none 51 | // OUTPUTS: none 52 | // DESCRIPTION: Turns Autorepeat mode on 53 | void asdf_repeat_auto_on(void); 54 | 55 | // PROCEDURE: asdf_repeat_activate 56 | // INPUTS: none 57 | // OUTPUTS: none 58 | // DESCRIPTION: set repeat state machine to repeat mode. Called when REPEAT key 59 | // is pressed. 60 | void asdf_repeat_activate(void); 61 | 62 | // PROCEDURE: asdf_repeat_deactivate 63 | // INPUTS: none 64 | // OUTPUTS: none 65 | // DESCRIPTION: Reset repeat state machine to default state. Called when REPEAT 66 | // key is released. 67 | void asdf_repeat_deactivate(void); 68 | 69 | // PROCEDURE: asdf_repeat 70 | // INPUTS: none 71 | // OUTPUTS: none 72 | // DESCRIPTION: counts down the repeat timer (if activated) and returns a TRUE 73 | // value when the counter times out. A true values indicates that the last value 74 | // should be repeated to the output. 75 | uint8_t asdf_repeat(void); 76 | 77 | #endif // !defined (ASDF_REPEAT_H) 78 | 79 | //-------|---------|---------+---------+---------+---------+---------+---------+ 80 | // Above line is 80 columns, and should display completely in the editor. 81 | -------------------------------------------------------------------------------- /firmware/asdf/src/asdf_virtual.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unfified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_virtual.h 7 | // 8 | // Definitions and prototypes for virtual LED and virtual output management. 9 | // 10 | // Copyright 2019 David Fenyes 11 | // This program is free software: you can redistribute it and/or modify it under 12 | // the terms of the GNU General Public License as published by the Free Software 13 | // Foundation, either version 3 of the License, or (at your option) any later 14 | // version. 15 | // 16 | // This program is distributed in the hope that it will be useful, but WITHOUT 17 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 19 | // details. 20 | // 21 | // You should have received a copy of the GNU General Public License along with 22 | // this program. If not, see . 23 | // 24 | 25 | #if !defined(ASDF_VIRTUAL_H) 26 | #define ASDF_VIRTUAL_H 27 | 28 | #include "asdf_physical.h" 29 | 30 | // These are "virtual" output identifiers that can be mapped to the real outputs using 31 | // keymap initializer commands. 32 | typedef enum { 33 | V_NULL, 34 | VOUT1, 35 | VOUT2, 36 | VOUT3, 37 | VOUT4, 38 | VOUT5, 39 | VOUT6, 40 | VLED1, 41 | VLED2, 42 | VLED3, 43 | VCAPS_LED, 44 | VSHIFT_LED, 45 | ASDF_VIRTUAL_NUM_RESOURCES 46 | } asdf_virtual_dev_t; 47 | 48 | 49 | typedef enum { 50 | V_NOFUNC, 51 | V_SET_HI, 52 | V_SET_LO, 53 | V_PULSE_SHORT, 54 | V_PULSE_LONG, 55 | V_TOGGLE, 56 | ASDF_VIRTUAL_NUM_FUNCTIONS 57 | } asdf_virtual_function_t; 58 | 59 | // Each keymap specifies an array of initializer structs to configure virtual 60 | // devices, specifying the mapped real device and initial value. 61 | typedef struct { 62 | asdf_virtual_dev_t virtual_device; 63 | asdf_physical_dev_t physical_device; 64 | asdf_virtual_function_t function; 65 | uint8_t initial_value; 66 | } asdf_virtual_initializer_t; 67 | 68 | // PROCEDURE: asdf_virtual_action 69 | // INPUTS: (asdf_virtual_dev_t) virtual_out: which virtual output to modify 70 | // INPUTS: (asdf_virtual_function_t) function: what function to apply to the virtual output 71 | // OUTPUTS: none 72 | // DESCRIPTION: for each real output mapped to the virtual output, apply the 73 | // specified function. 74 | void asdf_virtual_action(asdf_virtual_dev_t virtual_out, asdf_virtual_function_t function); 75 | 76 | // PROCEDURE: asdf_virtual_activate 77 | // INPUTS: asdf_virtual_dev_t: The virtual device to be activated 78 | // OUTPUTS: none 79 | // DESCRIPTION: for each real output mapped to the virtual output, apply the 80 | // function assigned to the virtual output at initialization. 81 | void asdf_virtual_activate(asdf_virtual_dev_t virtual_out); 82 | 83 | // PROCEDURE: asdf_virtual_assign 84 | // INPUTS: (asdf_virtual_dev_t) virtual_out - virtual output to be paired with the physical resource 85 | // (asdf_physical_dev_t) physical_out to be assigned to the virtual output. 86 | // (asdf_virtual_function_t) - the function to be applied to the virtual 87 | // device when activated by a keypress. 88 | // (uint8_t) initial_value - the initial state of the physical resource. 89 | // OUTPUTS: none 90 | // DESCRIPTION: map the virtual output specified by new_vout to physical_out, if 91 | // both arguments are valid. Ignore if not valid. 92 | // NOTES: if the virtual output is invalid, or the physical resource is invalid, 93 | // or the physical resource is already assigned, then nothing happens. 94 | void asdf_virtual_assign(asdf_virtual_dev_t virtual_out, asdf_physical_dev_t physical_out, 95 | asdf_virtual_function_t function, uint8_t initial_value); 96 | 97 | // PROCEDURE: asdf_virtual_init 98 | // INPUTS: initializers 99 | // OUTPUTS: none 100 | // DESCRIPTION: Initializes the LED and output mapping 101 | void asdf_virtual_init(void); 102 | 103 | // PROCEDURE: asdf_virtual_sync 104 | // INPUTS: none 105 | // OUTPUTS: none 106 | // DESCRIPTION: Synchronize the physical outputs with their controlling virtual devices. 107 | void asdf_virtual_sync(void); 108 | 109 | #endif /* !defined (ASDF_VIRTUAL_H) */ 110 | 111 | //-------|---------|---------+---------+---------+---------+---------+---------+ 112 | // Above line is 80 columns, and should display completely in the editor. 113 | -------------------------------------------------------------------------------- /firmware/asdf/src/main.c: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unfified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // main.c 7 | // 8 | // main program loop. Initialize hardware. Schedule key scans and i/o. 9 | // 10 | // Copyright 2019 David Fenyes 11 | // 12 | // This program is free software: you can redistribute it and/or modify it under 13 | // the terms of the GNU General Public License as published by the Free Software 14 | // Foundation, either version 3 of the License, or (at your option) any later 15 | // version. 16 | // 17 | // This program is distributed in the hope that it will be useful, but WITHOUT 18 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 20 | // details. 21 | // 22 | // You should have received a copy of the GNU General Public License along with 23 | // this program. If not, see . 24 | 25 | #include 26 | #include "asdf.h" 27 | #include "asdf_arch.h" 28 | #include "asdf_buffer.h" 29 | #include "asdf_hook.h" 30 | 31 | // PROCEDURE: main 32 | // INPUTS: none 33 | // OUTPUTS: none 34 | // 35 | // DESCRIPTION: Initialize hardware, Schedule key scans and i/o 36 | // 37 | // SIDE EFFECTS: See above 38 | // 39 | // NOTES: This code just initializes the hardware, and then loops. The loop 40 | // includes: 41 | // 42 | // - Check every 1 ms (or whatever the tick is set to), calls the keyboard 43 | // scan routine. 44 | // 45 | // - Check every pass through if any characters are buffered to send. If so, 46 | // send them. 47 | // 48 | // This is not the most efficient use of the hardware, but is an example of how 49 | // the keyboard scanner is used. Of course, this loop can be replaced with an 50 | // RTOS process as well. If an RTOS is used, then asdf_buffer can be modified 51 | // to use RTOS message queues instead of an internal buffer, or to keep the 52 | // internal buffer and use a counting semaphore to indicate characters in the 53 | // buffer. 54 | // 55 | // If you are adding special functions when using an RTOS, make sure the 56 | // functions do not block, or do any heavy computation. Rather, they should be 57 | // small and pass messages to appropriate processes to handle the activities. 58 | // 59 | // COMPLEXITY: 2 60 | // 61 | int main(void) 62 | { 63 | // initialize the keyboard logic: 64 | asdf_init(); 65 | 66 | while (1) { 67 | 68 | if (asdf_arch_tick()) { 69 | asdf_keycode_t code = asdf_next_code(); 70 | 71 | if (code < ASDF_INVALID_CODE) { 72 | // This is inside the loop because the output function may change 73 | void (*output_function)(asdf_keycode_t) = 74 | (void (*)(asdf_keycode_t)) asdf_hook_get(ASDF_HOOK_OUTPUT); 75 | (*output_function)(code); 76 | } 77 | asdf_keyscan(); 78 | } 79 | } 80 | } 81 | 82 | 83 | //-------|---------|---------+---------+---------+---------+---------+---------+ 84 | // Above line is 80 columns, and should display completely in the editor. 85 | -------------------------------------------------------------------------------- /firmware/asdf/test/CmakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file(${PROJECT_SRC_DIR}/Arch/asdf_arch_test.h ${CMAKE_CURRENT_BINARY_DIR}/asdf_arch.h COPYONLY) 2 | 3 | list(APPEND C_FLAGS 4 | "-std=c99" 5 | "-Wall" 6 | "-Wextra" 7 | "-Wpointer-arith" 8 | "-Wcast-align" 9 | "-Wwrite-strings" 10 | "-Wswitch-default" 11 | "-Wunreachable-code" 12 | "-Winit-self" 13 | "-Wmissing-field-initializers" 14 | "-Wno-unknown-pragmas" 15 | "-Wstrict-prototypes" 16 | "-Wundef" 17 | "-Wold-style-definition" 18 | "-g" 19 | ) 20 | 21 | list(APPEND TEST_INCLUDES 22 | ${CMAKE_CURRENT_SOURCE_DIR} 23 | ${CMAKE_CURRENT_BINARY_DIR} 24 | ${PROJECT_SRC_DIR} 25 | ${PROJECT_SRC_DIR}/Arch 26 | ) 27 | 28 | add_library(unity 29 | STATIC 30 | ${CMAKE_CURRENT_SOURCE_DIR}/unity/unity.c 31 | ) 32 | 33 | target_include_directories(unity 34 | PUBLIC 35 | ${CMAKE_CURRENT_SOURCE_DIR}/unity 36 | ) 37 | 38 | 39 | add_library(asdf_core 40 | STATIC 41 | asdf_keymap_table.c 42 | ${PROJECT_SRC_DIR}/asdf.c 43 | ${PROJECT_SRC_DIR}/asdf_buffer.c 44 | ${PROJECT_SRC_DIR}/asdf_hook.c 45 | ${PROJECT_SRC_DIR}/asdf_keymaps.c 46 | ${PROJECT_SRC_DIR}/asdf_modifiers.c 47 | ${PROJECT_SRC_DIR}/asdf_physical.c 48 | ${PROJECT_SRC_DIR}/asdf_repeat.c 49 | ${PROJECT_SRC_DIR}/asdf_virtual.c 50 | ${PROJECT_SRC_DIR}/Arch/asdf_arch_test.c 51 | ) 52 | 53 | target_include_directories(asdf_core 54 | PRIVATE 55 | ${PROJECT_SRC_DIR} 56 | ${PROJECT_SRC_DIR}/Arch 57 | ${CMAKE_CURRENT_SOURCE_DIR} 58 | ${CMAKE_CURRENT_BINARY_DIR} 59 | ) 60 | 61 | add_library(test_helpers 62 | STATIC 63 | ${CMAKE_CURRENT_SOURCE_DIR}/test_asdf_lib.c 64 | ${CMAKE_CURRENT_SOURCE_DIR}/test_asdf_keymap_defs.c 65 | ${CMAKE_CURRENT_SOURCE_DIR}/asdf_keymap_table.c 66 | ) 67 | 68 | target_include_directories(test_helpers 69 | PRIVATE 70 | ${CMAKE_CURRENT_SOURCE_DIR} 71 | ${PROJECT_SRC_DIR} 72 | ${CMAKE_CURRENT_BINARY_DIR} 73 | ) 74 | 75 | 76 | target_compile_options(test_helpers 77 | PRIVATE 78 | ${CFLAGS} 79 | ) 80 | 81 | function(setup_test testname) 82 | 83 | add_executable(${testname} 84 | ${testname}.c 85 | ) 86 | 87 | target_compile_options(${testname} 88 | PRIVATE 89 | ${CFLAGS} 90 | ) 91 | 92 | target_include_directories(${testname} 93 | PRIVATE 94 | ${TEST_INCLUDES} 95 | ) 96 | 97 | target_link_libraries(${testname} unity asdf_core test_helpers) 98 | 99 | add_test( 100 | NAME ${testname} 101 | COMMAND ${CMAKE_BINARY_DIR}/test/${testname} 102 | ) 103 | endfunction() 104 | 105 | enable_testing() 106 | 107 | setup_test(test_asdf_repeat) 108 | setup_test(test_asdf_modifiers) 109 | setup_test(test_asdf_keymaps) 110 | setup_test(test_asdf_buffer) 111 | setup_test(test_asdf_virtual) 112 | setup_test(test_asdf_hook) 113 | 114 | 115 | -------------------------------------------------------------------------------- /firmware/asdf/test/_clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Mozilla 3 | AlignAfterOpenBracket: Align 4 | AlignOperands: 'true' 5 | AlignTrailingComments: 'true' 6 | AllowAllParametersOfDeclarationOnNextLine: 'false' 7 | AllowShortBlocksOnASingleLine: 'false' 8 | AllowShortCaseLabelsOnASingleLine: 'true' 9 | AllowShortFunctionsOnASingleLine: Empty 10 | AllowShortIfStatementsOnASingleLine: 'false' 11 | AllowShortLoopsOnASingleLine: 'true' 12 | AlwaysBreakAfterDefinitionReturnType: None 13 | AlwaysBreakAfterReturnType: None 14 | AlwaysBreakBeforeMultilineStrings: 'true' 15 | BinPackArguments: 'true' 16 | BinPackParameters: 'true' 17 | BreakBeforeBinaryOperators: NonAssignment 18 | BreakBeforeBraces: Stroustrup 19 | ColumnLimit: '100' 20 | ConstructorInitializerIndentWidth: '2' 21 | ContinuationIndentWidth: '2' 22 | DerivePointerAlignment: 'false' 23 | DisableFormat: 'false' 24 | IncludeBlocks: Preserve 25 | IndentCaseLabels: 'true' 26 | IndentPPDirectives: None 27 | IndentWidth: '2' 28 | IndentWrappedFunctionNames: 'false' 29 | KeepEmptyLinesAtTheStartOfBlocks: 'true' 30 | Language: Cpp 31 | MaxEmptyLinesToKeep: '2' 32 | PointerAlignment: Right 33 | ReflowComments: 'true' 34 | SortIncludes: 'false' 35 | SpaceAfterCStyleCast: 'true' 36 | SpaceBeforeAssignmentOperators: 'true' 37 | SpaceBeforeParens: ControlStatements 38 | SpaceInEmptyParentheses: 'false' 39 | SpacesBeforeTrailingComments: '1' 40 | SpacesInCStyleCastParentheses: 'false' 41 | SpacesInParentheses: 'false' 42 | SpacesInSquareBrackets: 'false' 43 | TabWidth: '8' 44 | UseTab: Never 45 | 46 | ... 47 | -------------------------------------------------------------------------------- /firmware/asdf/test/asdf_keymap_setup.c: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_table.c 7 | // 8 | // initialize keymap setup function table 9 | // 10 | // *** This is a special versiof for testing. 11 | // *** Not auto-generated. 12 | // 13 | // Copyright 2019 David Fenyes 14 | // 15 | // This program is free software: you can redistribute it and/or modify it under 16 | // the terms of the GNU General Public License as published by the Free Software 17 | // Foundation, either version 3 of the License, or (at your option) any later 18 | // version. 19 | // 20 | // This program is distributed in the hope that it will be useful, but WITHOUT 21 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 22 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 23 | // details. 24 | // 25 | // You should have received a copy of the GNU General Public License along with 26 | // this program. If not, see . 27 | // 28 | 29 | #include 30 | #include "asdf_keymap_table.h" 31 | #include "test_asdf_keymap_defs.h" 32 | 33 | // PROCEDURE: asdf_keymap_setup 34 | // 35 | // INPUTS: (uint8_t) index - index of the keymap setup function to call 36 | // OUTPUTS: none 37 | //// 38 | // DESCRIPTION: This function calls the keymap setup function specified 39 | // by the index. 40 | // 41 | // SIDE EFFECTS: See Description 42 | // 43 | // NOTES: This function is necessary because functions defined in external 44 | // modules are not considered compile-time constants by the C99 standard, so the 45 | // array cannot be initialized with a compile-time declaration. 46 | // 47 | // SCOPE: public 48 | // 49 | // COMPLEXITY: 1 50 | // 51 | void asdf_keymap_setup(uint8_t index) { 52 | switch(index) { 53 | 54 | default: 55 | case ASDF_TEST_PLAIN_MAP_INDEX: setup_test_plain_map(); break; 56 | case ASDF_TEST_CAPS_MAP_INDEX: setup_test_caps_map(); break; 57 | case ASDF_TEST2_PLAIN_MAP_INDEX: setup_test2_plain_map(); break; 58 | case ASDF_TEST2_CAPS_MAP_INDEX: setup_test2_caps_map(); 59 | break; 60 | 61 | // keymap assignments for the virtual device tests 62 | case SINGLE_TESTS_KEYMAP: setup_test_vdevs_single(); break; 63 | case DOUBLE_ASSIGN_TEST_KEYMAP: setup_test_vdevs_double(); break; 64 | case TRIPLE_TESTS_KEYMAP: setup_test_vdevs_triple(); break; 65 | case VCAPS_TEST_KEYMAP: setup_test_vdevs_vcaps(); 66 | break; 67 | 68 | // keymap assignments for the hook mechanism tests 69 | case ASDF_TEST_DEFAULT_SCANNER_MAP: setup_test_hooks_alt_scanner(); break; 70 | case ASDF_TEST_ALTERNATE_OUTPUT_MAP: setup_test_hooks_alt_output(); break; 71 | case ASDF_TEST_EACH_SCAN_MAP: setup_test_hooks_each_scan(); break; 72 | } 73 | } 74 | 75 | // PROCEDURE: asdf_keymap_valid 76 | // 77 | // INPUTS: (uint8_t) index - index of the keymap setup function to check 78 | // OUTPUTS: (uintu_t) returns TRUE (nonzero) if valid, FALSE (0) otherwise 79 | // 80 | // DESCRIPTION: This function returns TRUE if the index corresponds to 81 | // a valid keymap. 82 | // 83 | // SIDE EFFECTS: none 84 | // 85 | // NOTES: 86 | // 87 | // SCOPE: public 88 | // 89 | // COMPLEXITY: 1 90 | // 91 | uint8_t asdf_keymap_valid(uint8_t index) { 92 | uint8_t valid = 0; 93 | 94 | switch(index) { 95 | case ASDF_TEST_PLAIN_MAP_INDEX: 96 | case ASDF_TEST_CAPS_MAP_INDEX: 97 | case ASDF_TEST2_PLAIN_MAP_INDEX: 98 | case ASDF_TEST2_CAPS_MAP_INDEX: 99 | 100 | // keymap assignments for the virtual device tests 101 | case SINGLE_TESTS_KEYMAP: 102 | case DOUBLE_ASSIGN_TEST_KEYMAP: 103 | case TRIPLE_TESTS_KEYMAP: 104 | case VCAPS_TEST_KEYMAP: 105 | 106 | // keymap assignments for the hook mechanism tests 107 | case ASDF_TEST_DEFAULT_SCANNER_MAP: 108 | case ASDF_TEST_ALTERNATE_OUTPUT_MAP: 109 | case ASDF_TEST_EACH_SCAN_MAP: 110 | 111 | valid = 1; 112 | break; 113 | 114 | default: 115 | valid = 0; 116 | break; 117 | } 118 | 119 | return valid; 120 | } 121 | 122 | 123 | //-------|---------|---------+---------+---------+---------+---------+---------+ 124 | // Above line is 80 columns, and should display completely in the editor. 125 | 126 | -------------------------------------------------------------------------------- /firmware/asdf/test/asdf_keymap_setup.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_table.c 7 | // 8 | // initialize keymap setup function table 9 | // 10 | // *** This is configured for testing. 11 | // *** NOT auto-generated 12 | // 13 | // Copyright 2019 David Fenyes 14 | // 15 | // This program is free software: you can redistribute it and/or modify it under 16 | // the terms of the GNU General Public License as published by the Free Software 17 | // Foundation, either version 3 of the License, or (at your option) any later 18 | // version. 19 | // 20 | // This program is distributed in the hope that it will be useful, but WITHOUT 21 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 22 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 23 | // details. 24 | // 25 | // You should have received a copy of the GNU General Public License along with 26 | // this program. If not, see . 27 | // 28 | 29 | #define ASDF_NUM_KEYMAPS 11 30 | 31 | // define the type for a keymap setup function. Keymaps are registerd by storing 32 | // a keymap setup function in the keymap setup array. 33 | 34 | // PROCEDURE: asdf_keymap_setup 35 | // INPUTS: (uint8_t) index - index of the keymap setup function to call 36 | // OUTPUTS: none 37 | // DESCRIPTION: This function calls the keymap setup function specified 38 | // by the index. 39 | // SIDE EFFECTS: See Description 40 | void asdf_keymap_setup(uint8_t index); 41 | 42 | // PROCEDURE: asdf_keymap_valid 43 | // INPUTS: (uint8_t) index - index of the keymap setup function to check 44 | // OUTPUTS: (uintu_t) returns TRUE (nonzero) if valid, FALSE (0) otherwise 45 | // DESCRIPTION: This function returns TRUE if the index corresponds to 46 | // a valid keymap. 47 | uint8_t asdf_keymap_valid(uint8_t index); 48 | 49 | //-------|---------|---------+---------+---------+---------+---------+---------+ 50 | // Above line is 80 columns, and should display completely in the editor. 51 | 52 | -------------------------------------------------------------------------------- /firmware/asdf/test/asdf_keymap_table.c: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_table.c 7 | // 8 | // initialize keymap setup function table 9 | // 10 | // *** This is a special versiof for testing. 11 | // *** Not auto-generated. 12 | // 13 | // Copyright 2019 David Fenyes 14 | // 15 | // This program is free software: you can redistribute it and/or modify it under 16 | // the terms of the GNU General Public License as published by the Free Software 17 | // Foundation, either version 3 of the License, or (at your option) any later 18 | // version. 19 | // 20 | // This program is distributed in the hope that it will be useful, but WITHOUT 21 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 22 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 23 | // details. 24 | // 25 | // You should have received a copy of the GNU General Public License along with 26 | // this program. If not, see . 27 | // 28 | 29 | #include 30 | #include "asdf_keymap_table.h" 31 | #include "test_asdf_keymap_defs.h" 32 | 33 | // PROCEDURE: asdf_keymap_setup 34 | // 35 | // INPUTS: (uint8_t) index - index of the keymap setup function to call 36 | // OUTPUTS: none 37 | //// 38 | // DESCRIPTION: This function calls the keymap setup function specified 39 | // by the index. 40 | // 41 | // SIDE EFFECTS: See Description 42 | // 43 | // NOTES: This function is necessary because functions defined in external 44 | // modules are not considered compile-time constants by the C99 standard, so the 45 | // array cannot be initialized with a compile-time declaration. 46 | // 47 | // SCOPE: public 48 | // 49 | // COMPLEXITY: 1 50 | // 51 | void asdf_keymap_setup(uint8_t index) { 52 | switch(index) { 53 | 54 | default: 55 | case ASDF_TEST_PLAIN_MAP_INDEX: setup_test_plain_map(); break; 56 | case ASDF_TEST_CAPS_MAP_INDEX: setup_test_caps_map(); break; 57 | case ASDF_TEST2_PLAIN_MAP_INDEX: setup_test2_plain_map(); break; 58 | case ASDF_TEST2_CAPS_MAP_INDEX: setup_test2_caps_map(); 59 | break; 60 | 61 | // keymap assignments for the virtual device tests 62 | case SINGLE_TESTS_KEYMAP: setup_test_vdevs_single(); break; 63 | case DOUBLE_ASSIGN_TEST_KEYMAP: setup_test_vdevs_double(); break; 64 | case TRIPLE_TESTS_KEYMAP: setup_test_vdevs_triple(); break; 65 | case VCAPS_TEST_KEYMAP: setup_test_vdevs_vcaps(); 66 | break; 67 | 68 | // keymap assignments for the hook mechanism tests 69 | case ASDF_TEST_DEFAULT_SCANNER_MAP: setup_test_hooks_alt_scanner(); break; 70 | case ASDF_TEST_ALTERNATE_OUTPUT_MAP: setup_test_hooks_alt_output(); break; 71 | case ASDF_TEST_EACH_SCAN_MAP: setup_test_hooks_each_scan(); break; 72 | } 73 | } 74 | 75 | // PROCEDURE: asdf_keymap_valid 76 | // 77 | // INPUTS: (uint8_t) index - index of the keymap setup function to check 78 | // OUTPUTS: (uintu_t) returns TRUE (nonzero) if valid, FALSE (0) otherwise 79 | // 80 | // DESCRIPTION: This function returns TRUE if the index corresponds to 81 | // a valid keymap. 82 | // 83 | // SIDE EFFECTS: none 84 | // 85 | // NOTES: 86 | // 87 | // SCOPE: public 88 | // 89 | // COMPLEXITY: 1 90 | // 91 | uint8_t asdf_keymap_valid(uint8_t index) { 92 | uint8_t valid = 0; 93 | 94 | switch(index) { 95 | case ASDF_TEST_PLAIN_MAP_INDEX: 96 | case ASDF_TEST_CAPS_MAP_INDEX: 97 | case ASDF_TEST2_PLAIN_MAP_INDEX: 98 | case ASDF_TEST2_CAPS_MAP_INDEX: 99 | 100 | // keymap assignments for the virtual device tests 101 | case SINGLE_TESTS_KEYMAP: 102 | case DOUBLE_ASSIGN_TEST_KEYMAP: 103 | case TRIPLE_TESTS_KEYMAP: 104 | case VCAPS_TEST_KEYMAP: 105 | 106 | // keymap assignments for the hook mechanism tests 107 | case ASDF_TEST_DEFAULT_SCANNER_MAP: 108 | case ASDF_TEST_ALTERNATE_OUTPUT_MAP: 109 | case ASDF_TEST_EACH_SCAN_MAP: 110 | 111 | valid = 1; 112 | break; 113 | 114 | default: 115 | valid = 0; 116 | break; 117 | } 118 | 119 | return valid; 120 | } 121 | 122 | 123 | //-------|---------|---------+---------+---------+---------+---------+---------+ 124 | // Above line is 80 columns, and should display completely in the editor. 125 | 126 | -------------------------------------------------------------------------------- /firmware/asdf/test/asdf_keymap_table.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // asdf_keymap_table.c 7 | // 8 | // initialize keymap setup function table 9 | // 10 | // *** This is configured for testing. 11 | // *** NOT auto-generated 12 | // 13 | // Copyright 2019 David Fenyes 14 | // 15 | // This program is free software: you can redistribute it and/or modify it under 16 | // the terms of the GNU General Public License as published by the Free Software 17 | // Foundation, either version 3 of the License, or (at your option) any later 18 | // version. 19 | // 20 | // This program is distributed in the hope that it will be useful, but WITHOUT 21 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 22 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 23 | // details. 24 | // 25 | // You should have received a copy of the GNU General Public License along with 26 | // this program. If not, see . 27 | // 28 | 29 | #define ASDF_NUM_KEYMAPS 11 30 | 31 | // define the type for a keymap setup function. Keymaps are registerd by storing 32 | // a keymap setup function in the keymap setup array. 33 | 34 | // PROCEDURE: asdf_keymap_setup 35 | // INPUTS: (uint8_t) index - index of the keymap setup function to call 36 | // OUTPUTS: none 37 | // DESCRIPTION: This function calls the keymap setup function specified 38 | // by the index. 39 | // SIDE EFFECTS: See Description 40 | void asdf_keymap_setup(uint8_t index); 41 | 42 | // PROCEDURE: asdf_keymap_valid 43 | // INPUTS: (uint8_t) index - index of the keymap setup function to check 44 | // OUTPUTS: (uintu_t) returns TRUE (nonzero) if valid, FALSE (0) otherwise 45 | // DESCRIPTION: This function returns TRUE if the index corresponds to 46 | // a valid keymap. 47 | uint8_t asdf_keymap_valid(uint8_t index); 48 | 49 | //-------|---------|---------+---------+---------+---------+---------+---------+ 50 | // Above line is 80 columns, and should display completely in the editor. 51 | 52 | -------------------------------------------------------------------------------- /firmware/asdf/test/test_asdf_hook.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "unity.h" 6 | #include "asdf.h" 7 | #include "asdf_arch_test.h" 8 | #include "asdf_ascii.h" 9 | #include "asdf_modifiers.h" 10 | #include "asdf_keymaps.h" 11 | #include "asdf_buffer.h" 12 | #include "asdf_repeat.h" 13 | #include "asdf_hook.h" 14 | #include "test_asdf_lib.h" 15 | #include "test_asdf_keymap_defs.h" 16 | 17 | //ASDF_TEST_DECLARATIONS; 18 | 19 | // emulates arch_read_row function, used mainly to see that the read_row hook is 20 | // getting called. 21 | asdf_cols_t asdf_arch_read_row(uint8_t row) 22 | { 23 | return (asdf_keycode_t) (row + 1); 24 | } 25 | 26 | 27 | void setUp(void) 28 | { 29 | test_hook_clear(); 30 | asdf_keymaps_init(); 31 | asdf_init(); 32 | 33 | asdf_keymaps_select(ASDF_TEST_DEFAULT_SCANNER_MAP); 34 | } 35 | 36 | void tearDown(void) {} 37 | 38 | 39 | typedef asdf_cols_t (*scanner_func_t)(uint8_t); 40 | 41 | void test_default_scan_hook_is_default_scanner(void) 42 | { 43 | scanner_func_t testfunc = (scanner_func_t) asdf_hook_get(ASDF_HOOK_ROW_SCANNER); 44 | asdf_cols_t testval = 0; 45 | 46 | // make sure the pointer points to the correct function 47 | TEST_ASSERT_EQUAL_PTR(testfunc, &asdf_arch_read_row); 48 | 49 | // Now try calling the function 50 | testval = (*testfunc)(100); 51 | TEST_ASSERT_EQUAL_INT((int) asdf_arch_read_row(100), (int) testval); 52 | } 53 | 54 | // test_alternate_scan_hook 55 | void test_alternate_scan_hook(void) 56 | { 57 | asdf_keymaps_select(ASDF_TEST_ALTERNATE_SCANNER_MAP); 58 | scanner_func_t testfunc = (scanner_func_t) asdf_hook_get(ASDF_HOOK_ROW_SCANNER); 59 | asdf_cols_t testval = 0; 60 | 61 | // make sure the pointer points to the correct function 62 | TEST_ASSERT_EQUAL_PTR(testfunc, &test_hook_read_row); 63 | 64 | // Now try calling the function 65 | testval = (*testfunc)(100); 66 | TEST_ASSERT_EQUAL_INT((int) test_hook_read_row(100), (int) testval); 67 | } 68 | 69 | #define NUM_SCAN_TEST_REPS 101 70 | 71 | void test_each_scan_hook_is_executed_each_scan(void) 72 | { 73 | 74 | test_hook_clear(); 75 | asdf_keymaps_select(ASDF_TEST_EACH_SCAN_MAP); 76 | TEST_ASSERT_EQUAL_INT(0, test_hook_readback()); 77 | for (int i = 0; i < NUM_SCAN_TEST_REPS; i++) { 78 | asdf_keyscan(); 79 | } 80 | TEST_ASSERT_EQUAL_INT(NUM_SCAN_TEST_REPS, test_hook_readback()); 81 | } 82 | 83 | 84 | 85 | int main(void) 86 | { 87 | UNITY_BEGIN(); 88 | RUN_TEST(test_default_scan_hook_is_default_scanner); 89 | RUN_TEST(test_alternate_scan_hook); 90 | RUN_TEST(test_each_scan_hook_is_executed_each_scan); 91 | return UNITY_END(); 92 | } 93 | -------------------------------------------------------------------------------- /firmware/asdf/test/test_asdf_keyslib.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "asdf.h" 3 | #include "asdf_keymaps.h" 4 | #include "asdf_keymap_defs.h" 5 | #include "test_asdf_lib.h" 6 | #include "asdf_arch.h" 7 | 8 | static uint32_t key_matrix[ASDF_NUM_ROWS] = {}; 9 | 10 | ASDF_KEYMAP_DECLARATIONS; 11 | 12 | 13 | coord_t *find_code(asdf_keycode_t code) 14 | { 15 | uint32_t done = 0; 16 | static coord_t location = { .row = -1, .col = -1 }; 17 | 18 | for (uint32_t row = 0; !done && (row < ASDF_NUM_ROWS); row++) { 19 | for (uint32_t col = 0; !done && (col < ASDF_NUM_COLS); col++) { 20 | if (test_PLAIN_matrix[row][col] == code) { 21 | done = 1; 22 | location.row = row; 23 | location.col = col; 24 | } 25 | } 26 | } 27 | return &location; 28 | } 29 | 30 | 31 | void keyscan_delay(int32_t ticks) 32 | { 33 | for (; ticks; ticks--) { 34 | asdf_keyscan(); 35 | } 36 | } 37 | 38 | void press_no_debounce(asdf_keycode_t code) 39 | { 40 | coord_t *location = find_code(code); 41 | key_matrix[location->row] |= (1 << location->col); 42 | } 43 | 44 | void release_no_debounce(asdf_keycode_t code) 45 | { 46 | coord_t *location = find_code(code); 47 | key_matrix[location->row] &= ~(1 << location->col); 48 | } 49 | 50 | void press(asdf_keycode_t code) 51 | { 52 | press_no_debounce(code); 53 | keyscan_delay(ASDF_DEBOUNCE_TIME_MS); 54 | } 55 | 56 | void release(asdf_keycode_t code) 57 | { 58 | release_no_debounce(code); 59 | keyscan_delay(ASDF_DEBOUNCE_TIME_MS); 60 | } 61 | 62 | 63 | asdf_cols_t asdf_arch_read_row(uint8_t row) 64 | { 65 | return key_matrix[row]; 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /firmware/asdf/test/test_asdf_keyslib.h: -------------------------------------------------------------------------------- 1 | #if !defined(TEST_ASDF_LIB_H) 2 | 3 | #include "asdf_keymaps.h" 4 | 5 | // struct to define keymap row,col pairs 6 | typedef struct { 7 | int32_t row; 8 | int32_t col; 9 | } coord_t; 10 | 11 | 12 | void keyscan_delay(int32_t ticks); 13 | void press_no_debounce(asdf_keycode_t code); 14 | void release_no_debounce(asdf_keycode_t code); 15 | void press(asdf_keycode_t code); 16 | void release(asdf_keycode_t code); 17 | asdf_cols_t asdf_arch_read_row(uint8_t row); 18 | coord_t *find_code(asdf_keycode_t code); 19 | 20 | 21 | 22 | #define TEST_ASDF_LIB_H 23 | #endif // if !defined(TEST_ASDF_LIB_H) 24 | -------------------------------------------------------------------------------- /firmware/asdf/test/test_asdf_lib.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "asdf.h" 3 | #include "asdf_virtual.h" 4 | #include "asdf_physical.h" 5 | #include "asdf_keymaps.h" 6 | #include "asdf_arch.h" 7 | #include "asdf_hook.h" 8 | #include "test_asdf_lib.h" 9 | 10 | uint32_t hook_register; 11 | 12 | uint32_t max(uint8_t first, uint8_t second) 13 | { 14 | uint32_t max = first; 15 | if (second > max) { 16 | max = second; 17 | } 18 | return max; 19 | } 20 | 21 | void test_hook_clear(void) 22 | { 23 | hook_register = 0; 24 | } 25 | 26 | uint32_t test_hook_readback(void) 27 | { 28 | return hook_register; 29 | } 30 | 31 | void test_hook_1(void) 32 | { 33 | hook_register |= TEST_HOOK_VAL1; 34 | } 35 | 36 | void test_hook_2(void) 37 | { 38 | hook_register |= TEST_HOOK_VAL2; 39 | } 40 | 41 | void test_hook_3(void) 42 | { 43 | hook_register |= TEST_HOOK_VAL3; 44 | } 45 | 46 | void test_hook_4(void) 47 | { 48 | hook_register |= TEST_HOOK_VAL4; 49 | } 50 | 51 | void test_hook_5(void) 52 | { 53 | hook_register |= TEST_HOOK_VAL5; 54 | } 55 | 56 | uint8_t test_hook_read_row(uint8_t val) 57 | { 58 | return (uint8_t) val+2; 59 | } 60 | 61 | void test_hook_output(uint8_t val) 62 | { 63 | hook_register = val; 64 | } 65 | 66 | void test_hook_each_scan(void) 67 | { 68 | hook_register++; 69 | } 70 | -------------------------------------------------------------------------------- /firmware/asdf/test/test_asdf_lib.h: -------------------------------------------------------------------------------- 1 | #if !defined(TEST_ASDF_LIB_H) 2 | #define TEST_ASDF_LIB_H 3 | 4 | #define TEST_HOOK_VAL1 1 5 | #define TEST_HOOK_VAL2 2 6 | #define TEST_HOOK_VAL3 4 7 | #define TEST_HOOK_VAL4 8 8 | #define TEST_HOOK_VAL5 16 9 | 10 | uint32_t max(uint8_t first, uint8_t second); 11 | void test_hook_clear(void); 12 | uint32_t test_hook_readback(void); 13 | void test_hook_1(void); 14 | void test_hook_2(void); 15 | void test_hook_3(void); 16 | void test_hook_4(void); 17 | void test_hook_5(void); 18 | void test_hook_each_scan(void); 19 | uint8_t test_hook_read_row(uint8_t val); 20 | void test_hook_output(uint8_t val); 21 | 22 | 23 | #endif // if !defined(TEST_ASDF_LIB_H) 24 | -------------------------------------------------------------------------------- /firmware/asdf/test/test_keymapdefs.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- 2 | // 3 | // Unfified Keyboard Project 4 | // ASDF keyboard firmware 5 | // 6 | // test_keymapdefs.h 7 | // 8 | // Copyright 2019 David Fenyes 9 | // 10 | // This program is free software: you can redistribute it and/or modify it under 11 | // the terms of the GNU General Public License as published by the Free Software 12 | // Foundation, either version 3 of the License, or (at your option) any later 13 | // version. 14 | // 15 | // This program is distributed in the hope that it will be useful, but WITHOUT 16 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 17 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 18 | // details. 19 | // 20 | // You should have received a copy of the GNU General Public License along with 21 | // this program. If not, see . 22 | 23 | // While there is nothing preventing a standard keyboard from having both a 24 | // "Shift Lock" key and a "Caps Lock" key, usually only one will be present. For 25 | // testing, both must be present to test their functionality. 26 | 27 | 28 | #if !(defined) TEST_KEYMAPDEFS_H 29 | 30 | 31 | #define PLAIN_MATRIX_1 RESERVED_1 32 | #define CAPS_MATRIX_1 RESERVED_2 33 | #define SHIFT_MATRIX_1 RESERVED_3 34 | #define CTRL_MATRIX_1 RESERVED_4 35 | 36 | #define SINGLE_TESTS_KEYMAP ASDF_TEST_PLAIN_MAP_INDEX 37 | #define DOUBLE_ASSIGN_TEST_KEYMAP ASDF_TEST_PLAIN_MAP_INDEX 38 | #define TRIPLE_TESTS_KEYMAP ASDF_TEST_CAPS_MAP_INDEX 39 | 40 | #define ASDF_TEST_MAP_DIP_SWITCHES \ 41 | [ASDF_LAST_ROW] = { ACTION_MAPSEL_0, ACTION_MAPSEL_1, ACTION_MAPSEL_2, ACTION_MAPSEL_3 } 42 | 43 | #endif // TEST_KEYMAPDEFS_H 44 | 45 | //-------|---------|---------+---------+---------+---------+---------+---------+ 46 | // Above line is 80 columns, and should display completely in the editor. 47 | -------------------------------------------------------------------------------- /firmware/asdf/test/unity/auto/colour_prompt.rb: -------------------------------------------------------------------------------- 1 | # ========================================== 2 | # Unity Project - A Test Framework for C 3 | # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 4 | # [Released under MIT License. Please refer to license.txt for details] 5 | # ========================================== 6 | 7 | if RUBY_PLATFORM =~ /(win|w)32$/ 8 | begin 9 | require 'Win32API' 10 | rescue LoadError 11 | puts 'ERROR! "Win32API" library not found' 12 | puts '"Win32API" is required for colour on a windows machine' 13 | puts ' try => "gem install Win32API" on the command line' 14 | puts 15 | end 16 | # puts 17 | # puts 'Windows Environment Detected...' 18 | # puts 'Win32API Library Found.' 19 | # puts 20 | end 21 | 22 | class ColourCommandLine 23 | def initialize 24 | return unless RUBY_PLATFORM =~ /(win|w)32$/ 25 | get_std_handle = Win32API.new('kernel32', 'GetStdHandle', ['L'], 'L') 26 | @set_console_txt_attrb = 27 | Win32API.new('kernel32', 'SetConsoleTextAttribute', %w[L N], 'I') 28 | @hout = get_std_handle.call(-11) 29 | end 30 | 31 | def change_to(new_colour) 32 | if RUBY_PLATFORM =~ /(win|w)32$/ 33 | @set_console_txt_attrb.call(@hout, win32_colour(new_colour)) 34 | else 35 | "\033[30;#{posix_colour(new_colour)};22m" 36 | end 37 | end 38 | 39 | def win32_colour(colour) 40 | case colour 41 | when :black then 0 42 | when :dark_blue then 1 43 | when :dark_green then 2 44 | when :dark_cyan then 3 45 | when :dark_red then 4 46 | when :dark_purple then 5 47 | when :dark_yellow, :narrative then 6 48 | when :default_white, :default, :dark_white then 7 49 | when :silver then 8 50 | when :blue then 9 51 | when :green, :success then 10 52 | when :cyan, :output then 11 53 | when :red, :failure then 12 54 | when :purple then 13 55 | when :yellow then 14 56 | when :white then 15 57 | else 58 | 0 59 | end 60 | end 61 | 62 | def posix_colour(colour) 63 | # ANSI Escape Codes - Foreground colors 64 | # | Code | Color | 65 | # | 39 | Default foreground color | 66 | # | 30 | Black | 67 | # | 31 | Red | 68 | # | 32 | Green | 69 | # | 33 | Yellow | 70 | # | 34 | Blue | 71 | # | 35 | Magenta | 72 | # | 36 | Cyan | 73 | # | 37 | Light gray | 74 | # | 90 | Dark gray | 75 | # | 91 | Light red | 76 | # | 92 | Light green | 77 | # | 93 | Light yellow | 78 | # | 94 | Light blue | 79 | # | 95 | Light magenta | 80 | # | 96 | Light cyan | 81 | # | 97 | White | 82 | 83 | case colour 84 | when :black then 30 85 | when :red, :failure then 31 86 | when :green, :success then 32 87 | when :yellow then 33 88 | when :blue, :narrative then 34 89 | when :purple, :magenta then 35 90 | when :cyan, :output then 36 91 | when :white, :default_white then 37 92 | when :default then 39 93 | else 94 | 39 95 | end 96 | end 97 | 98 | def out_c(mode, colour, str) 99 | case RUBY_PLATFORM 100 | when /(win|w)32$/ 101 | change_to(colour) 102 | $stdout.puts str if mode == :puts 103 | $stdout.print str if mode == :print 104 | change_to(:default_white) 105 | else 106 | $stdout.puts("#{change_to(colour)}#{str}\033[0m") if mode == :puts 107 | $stdout.print("#{change_to(colour)}#{str}\033[0m") if mode == :print 108 | end 109 | end 110 | end 111 | 112 | def colour_puts(role, str) 113 | ColourCommandLine.new.out_c(:puts, role, str) 114 | end 115 | 116 | def colour_print(role, str) 117 | ColourCommandLine.new.out_c(:print, role, str) 118 | end 119 | -------------------------------------------------------------------------------- /firmware/asdf/test/unity/auto/colour_reporter.rb: -------------------------------------------------------------------------------- 1 | # ========================================== 2 | # Unity Project - A Test Framework for C 3 | # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 4 | # [Released under MIT License. Please refer to license.txt for details] 5 | # ========================================== 6 | 7 | require_relative 'colour_prompt' 8 | 9 | $colour_output = true 10 | 11 | def report(message) 12 | if !$colour_output 13 | $stdout.puts(message) 14 | else 15 | message = message.join('\n') if message.class == Array 16 | message.each_line do |line| 17 | line.chomp! 18 | colour = case line 19 | when /(?:total\s+)?tests:?\s+(\d+)\s+(?:total\s+)?failures:?\s+\d+\s+Ignored:?/i 20 | Regexp.last_match(1).to_i.zero? ? :green : :red 21 | when /PASS/ 22 | :green 23 | when /^OK$/ 24 | :green 25 | when /(?:FAIL|ERROR)/ 26 | :red 27 | when /IGNORE/ 28 | :yellow 29 | when /^(?:Creating|Compiling|Linking)/ 30 | :white 31 | else 32 | :silver 33 | end 34 | colour_puts(colour, line) 35 | end 36 | end 37 | $stdout.flush 38 | $stderr.flush 39 | end 40 | -------------------------------------------------------------------------------- /firmware/asdf/test/unity/auto/generate_config.yml: -------------------------------------------------------------------------------- 1 | #this is a sample configuration file for generate_module 2 | #you would use it by calling generate_module with the -ygenerate_config.yml option 3 | #files like this are useful for customizing generate_module to your environment 4 | :generate_module: 5 | :defaults: 6 | #these defaults are used in place of any missing options at the command line 7 | :path_src: ../src/ 8 | :path_inc: ../src/ 9 | :path_tst: ../test/ 10 | :update_svn: true 11 | :includes: 12 | #use [] for no additional includes, otherwise list the includes on separate lines 13 | :src: 14 | - Defs.h 15 | - Board.h 16 | :inc: [] 17 | :tst: 18 | - Defs.h 19 | - Board.h 20 | - Exception.h 21 | :boilerplates: 22 | #these are inserted at the top of generated files. 23 | #just comment out or remove if not desired. 24 | #use %1$s where you would like the file name to appear (path/extension not included) 25 | :src: | 26 | //------------------------------------------- 27 | // %1$s.c 28 | //------------------------------------------- 29 | :inc: | 30 | //------------------------------------------- 31 | // %1$s.h 32 | //------------------------------------------- 33 | :tst: | 34 | //------------------------------------------- 35 | // Test%1$s.c : Units tests for %1$s.c 36 | //------------------------------------------- 37 | -------------------------------------------------------------------------------- /firmware/asdf/test/unity/auto/test_file_filter.rb: -------------------------------------------------------------------------------- 1 | # ========================================== 2 | # Unity Project - A Test Framework for C 3 | # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 4 | # [Released under MIT License. Please refer to license.txt for details] 5 | # ========================================== 6 | 7 | require'yaml' 8 | 9 | module RakefileHelpers 10 | class TestFileFilter 11 | def initialize(all_files = false) 12 | @all_files = all_files 13 | 14 | return unless @all_files 15 | return unless File.exist?('test_file_filter.yml') 16 | 17 | filters = YAML.load_file('test_file_filter.yml') 18 | @all_files = filters[:all_files] 19 | @only_files = filters[:only_files] 20 | @exclude_files = filters[:exclude_files] 21 | end 22 | 23 | attr_accessor :all_files, :only_files, :exclude_files 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /firmware/asdf/test/unity/auto/type_sanitizer.rb: -------------------------------------------------------------------------------- 1 | module TypeSanitizer 2 | def self.sanitize_c_identifier(unsanitized) 3 | # convert filename to valid C identifier by replacing invalid chars with '_' 4 | unsanitized.gsub(/[-\/\\\.\,\s]/, '_') 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /hardware/apple2-encoder/README.md: -------------------------------------------------------------------------------- 1 | # Apple II/II+ Encoder 2 | 3 | This is a version of the ASCII interface wired up to be compatible with the 4 | Apple II/Apple II+ keyboard matrix. This board was broken out as a separate PCB 5 | from the Atmega2560-based interface board on which it was based, in order to 6 | keep the "custom" connector customizable on that board. 7 | 8 | This board is otherwise identical to rev 3.4 of the ATMega2560-based ASCII interface board, and shares the same firmware and features. 9 | 10 | Assembly Rendering 12 | 13 | ## Features 14 | - Parallel or serial output 15 | - Up to 8 configuration settings via an up-to-8 position DIP switch 16 | - Apple 1, Apple 2, and SOL-20 compatible outputs. Other configurations can be 17 | supported by making a custom cable. 18 | - Can decode arbitrary keyboards up 16 rows by 8 columns. 19 | - Supports up to 3 keyboard LEDs 20 | - Supports up to 3 "special" host outputs, such as RESET, SCREEN_CLEAR, BREAK, etc. 21 | - Socket for custom connector 22 | 23 | ## Assembly Notes 24 | 25 | - You may build this board as if it is a general purpose ASCII interface. In 26 | that case, you may want to avoid installing the 1x25 Apple2 keyboard header 27 | if it interferes with the target keyboard matrix. 28 | 29 | - This encoder is normally used with keyboards that have a diode per key. For use 30 | with a key matrix with no diodes (such as the Apple 2 key matrix), cut the PCB 31 | traces that short diodes D1-16, and install D1-16. 32 | 33 | 34 | - If you ARE building this board as an Apple 2 encoder, then you may OMIT: 35 | 36 | - Sol-20 connector J5 37 | - Custom connector J7 38 | - D17,D18,D19 - These are used for the "classic" keyboard matrix. 39 | - D7,D8,D15,D16 - These are diodes for rows 12-15, which are not used. 40 | - The serial out connector J3 if you do not plan to use a serial output. 41 | - The I/O connector J4, as all the I/O lines are routed through the 42 | keyboard connector. 43 | - If you will be using the keyboard with only an Apple 1 or Apple 2, then 44 | you do not need to install both the Apple 2 connector (J1) AND the Apple 45 | 1 connector (J2). You may install only the one you plan to use, and 46 | reduce the risk of plugging into the wrong socket (and possibly damaging 47 | the encoder). 48 | 49 | 1. Solder the surface-mount microcontroller first. Be sure to match pin 1 to the 50 | dot on the silk-screen layer. 51 | 1. Next, install the surface mount crystal, Y1. The orientation is not important. 52 | 1. Next, solder in the resitor R1 53 | 1. Install all the capacitors. Be sure to separate out the two capacitors for the XTAL 54 | circuit from the other capacitors, the rest of which are 0.1uF bypass capacitors. 55 | 1. Install the In-circuit Serial Programming (ISP) header, J6. (right-angle, 2x3 56 | 0.100") 57 | 1. If you will be using the Apple 1 connector, install the DIP socket J1 (16-pin 58 | dip). If you plan to insert and remove the cable many times, a dual-wipe 59 | socket may be preferable to machine-pin, since it has a lower insertion 60 | force, and you will be less likely to bend pins. If you plan to insert the 61 | cable once and leave it forever, I suggest a machine-pin DIP socket. 62 | 1. If you will be using the Apple 2 connector, install the DIP socket J2 (16-pin 63 | dip). The note for the Apple 1 connector selection applies here as well. 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /hardware/apple2-encoder/apple-encoder-bom.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/apple2-encoder/apple-encoder-bom.xlsx -------------------------------------------------------------------------------- /hardware/apple2-encoder/images/PCB-assembly-rendering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/apple2-encoder/images/PCB-assembly-rendering.png -------------------------------------------------------------------------------- /hardware/common/unikbd.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | $CMP 74HC240 4 | D 8-bit Buffer/Line Driver 3-state Inverting 5 | K TTL BUFFER 3State inv 6 | F https://assets.nexperia.com/documents/data-sheet/74HC_HCT240.pdf 7 | $ENDCMP 8 | # 9 | $CMP 74HCT240 10 | D 8-bit buffer; 3-state; inverting 11 | K octal buffer line driver inverting 12 | F https://assets.nexperia.com/documents/data-sheet/74HC_HCT240.pdf 13 | $ENDCMP 14 | # 15 | $CMP 74LS192 16 | D Synchronous 4-bit Up/Down (2 clk) counter 17 | K TTL CNT CNT4 18 | F http://www.ti.com/lit/ds/symlink/sn74ls193.pdf 19 | $ENDCMP 20 | # 21 | $CMP 74LS193 22 | D Synchronous 4-bit Up/Down (2 clk) counter 23 | K TTL CNT CNT4 24 | F http://www.ti.com/lit/ds/symlink/sn74ls193.pdf 25 | $ENDCMP 26 | # 27 | $CMP ATSAMD51J18A-A 28 | D SAM D51 Microchip SMART ARM Cortex-M4F-based MCU, 256K Flash, 128K SRAM, TQFP-64 29 | K 32-bit ARM Cortex-M4F MCU Microcontroller 30 | F http://ww1.microchip.com/downloads/en/DeviceDoc/60001507E.pdf 31 | $ENDCMP 32 | # 33 | $CMP ATSAMD51J19A-A 34 | D SAM D51 Microchip SMART ARM Cortex-M4F-based MCU, 512K Flash, 192K SRAM, TQFP-64 35 | K 32-bit ARM Cortex-M4F MCU Microcontroller 36 | F http://ww1.microchip.com/downloads/en/DeviceDoc/60001507E.pdf 37 | $ENDCMP 38 | # 39 | $CMP ATSAMD51J20A-A 40 | D SAM D51 Microchip SMART ARM Cortex-M4F-based MCU, 1024K Flash, 256K SRAM, TQFP-64 41 | K 32-bit ARM Cortex-M4F MCU Microcontroller 42 | F http://ww1.microchip.com/downloads/en/DeviceDoc/60001507E.pdf 43 | $ENDCMP 44 | # 45 | $CMP SW_Push_LED 46 | D Push button switch with LED, generic 47 | K switch normally-open pushbutton push-button LED 48 | F ~ 49 | $ENDCMP 50 | # 51 | #End Doc Library 52 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/D_DO-35_SOD27_P7.62mm_Horizontal_bypassed.kicad_mod: -------------------------------------------------------------------------------- 1 | (footprint "D_DO-35_SOD27_P7.62mm_Horizontal_bypassed" (version 20211014) (generator pcbnew) 2 | (layer "F.Cu") 3 | (tedit 5EBC782E) 4 | (descr "Diode, DO-35_SOD27 series, Axial, Horizontal, pin pitch=7.62mm, , length*diameter=4*2mm^2, , http://www.diodes.com/_files/packages/DO-35.pdf") 5 | (tags "net tie diode jumper") 6 | (attr through_hole) 7 | (fp_text reference "REF**" (at 3.81 -2.12) (layer "F.SilkS") 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | (tstamp d08ab517-137d-4194-9e87-91361ec16cb4) 10 | ) 11 | (fp_text value "D_DO-35_SOD27_P7.62mm_Horizontal" (at 3.81 2.12) (layer "F.Fab") 12 | (effects (font (size 1 1) (thickness 0.15))) 13 | (tstamp 5e060016-e6c0-463b-ae22-ada48d81bc6b) 14 | ) 15 | (fp_text user "K" (at 0 -1.8) (layer "F.SilkS") 16 | (effects (font (size 1 1) (thickness 0.15))) 17 | (tstamp 489fc5b8-041c-49c7-9533-fd894fba6a3d) 18 | ) 19 | (fp_text user "K" (at 0 -1.8) (layer "F.Fab") 20 | (effects (font (size 1 1) (thickness 0.15))) 21 | (tstamp 1da2d060-9d22-487a-9e55-a63ecab0db6a) 22 | ) 23 | (fp_text user "${REFERENCE}" (at 4.11 0) (layer "F.Fab") 24 | (effects (font (size 0.8 0.8) (thickness 0.12))) 25 | (tstamp 728804c3-90a5-447d-9c05-619d3e81ff51) 26 | ) 27 | (fp_poly (pts 28 | (xy 7.112 0.127) 29 | (xy 0.508 0.127) 30 | (xy 0.508 0) 31 | (xy 7.112 0) 32 | ) (layer "F.Cu") (width 0.0508) (fill solid) (tstamp 80c61bb9-37b5-4c80-807f-0e1c3664ddb4)) 33 | (fp_line (start 5.93 1.12) (end 5.93 -1.12) (layer "F.SilkS") (width 0.12) (tstamp 009dd38e-cd0a-4e4b-8376-e17850b40394)) 34 | (fp_line (start 1.69 -1.12) (end 1.69 1.12) (layer "F.SilkS") (width 0.12) (tstamp 2a85165b-8689-4651-b5b6-6e1774db45ef)) 35 | (fp_line (start 2.53 -1.12) (end 2.53 1.12) (layer "F.SilkS") (width 0.12) (tstamp a5430a80-d784-41d8-83de-e2f7822875c0)) 36 | (fp_line (start 2.29 -1.12) (end 2.29 1.12) (layer "F.SilkS") (width 0.12) (tstamp b05645bc-98a8-4a66-a19b-cd3656d6b1b2)) 37 | (fp_line (start 6.58 0) (end 5.93 0) (layer "F.SilkS") (width 0.12) (tstamp b84bf7e1-4132-4add-8770-3bb3b007eecb)) 38 | (fp_line (start 2.41 -1.12) (end 2.41 1.12) (layer "F.SilkS") (width 0.12) (tstamp d2ec4eda-d1de-4e61-8f90-8e48e063480e)) 39 | (fp_line (start 1.69 1.12) (end 5.93 1.12) (layer "F.SilkS") (width 0.12) (tstamp d550ca27-957a-4a94-b532-e8fad6d6c940)) 40 | (fp_line (start 5.93 -1.12) (end 1.69 -1.12) (layer "F.SilkS") (width 0.12) (tstamp dabd3fc4-d062-4dac-8108-1c578c07b096)) 41 | (fp_line (start 1.04 0) (end 1.69 0) (layer "F.SilkS") (width 0.12) (tstamp e025baa7-b570-40a0-a637-3cf1ecd6e628)) 42 | (fp_line (start 8.67 -1.25) (end -1.05 -1.25) (layer "F.CrtYd") (width 0.05) (tstamp 1a458631-594f-425f-aa02-07aa67b58536)) 43 | (fp_line (start -1.05 -1.25) (end -1.05 1.25) (layer "F.CrtYd") (width 0.05) (tstamp 661a58f1-0459-44ad-8bd7-8469570636df)) 44 | (fp_line (start -1.05 1.25) (end 8.67 1.25) (layer "F.CrtYd") (width 0.05) (tstamp 8672d9d5-76f6-47e1-8f0c-601ab662de5f)) 45 | (fp_line (start 8.67 1.25) (end 8.67 -1.25) (layer "F.CrtYd") (width 0.05) (tstamp d9535cea-fada-43d6-9b66-6654a06c1456)) 46 | (fp_line (start 2.41 -1) (end 2.41 1) (layer "F.Fab") (width 0.1) (tstamp 0f65d06a-076d-4874-9188-171988003480)) 47 | (fp_line (start 1.81 1) (end 5.81 1) (layer "F.Fab") (width 0.1) (tstamp 3ae64378-0d07-479c-89ae-33112f849b31)) 48 | (fp_line (start 2.31 -1) (end 2.31 1) (layer "F.Fab") (width 0.1) (tstamp 4b644ed8-033d-433e-8ae3-739a5a16af29)) 49 | (fp_line (start 0 0) (end 1.81 0) (layer "F.Fab") (width 0.1) (tstamp 5c56dd6f-2d56-46e6-b269-df74fb784508)) 50 | (fp_line (start 5.81 -1) (end 1.81 -1) (layer "F.Fab") (width 0.1) (tstamp 5d7ca193-a5ec-4bd0-99b7-4f5a36b38598)) 51 | (fp_line (start 2.51 -1) (end 2.51 1) (layer "F.Fab") (width 0.1) (tstamp 80596ef4-98bc-4b89-9bbd-de4481e05ff4)) 52 | (fp_line (start 5.81 1) (end 5.81 -1) (layer "F.Fab") (width 0.1) (tstamp 9106e56e-223e-4392-904e-7644cabb99ad)) 53 | (fp_line (start 7.62 0) (end 5.81 0) (layer "F.Fab") (width 0.1) (tstamp bb5ff6ec-07f4-4a70-a0b3-1bb277a055b1)) 54 | (fp_line (start 1.81 -1) (end 1.81 1) (layer "F.Fab") (width 0.1) (tstamp f4d157a0-bcca-4ea3-a672-640ab334f7dc)) 55 | (pad "1" thru_hole rect (at 0 0) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) (tstamp 4e2c38ea-6642-4bc0-8ae3-4561e1bd1734)) 56 | (pad "2" thru_hole oval (at 7.62 0) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) (tstamp 9594575e-2758-42b9-905a-924e1341e2bf)) 57 | ) 58 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/Futaba-MD-4PCS-LED-aligner.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Futaba-MD-4PCS-LED-aligner (layer F.Cu) (tedit 5F3AC1AE) 2 | (fp_text reference REF** (at -3.937 -8.4582) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value MD-4PCS-aligner (at 0.1524 8.8646) (layer B.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_circle (center 0 -0.1016) (end 7.8232 -0.1016) (layer Edge.Cuts) (width 0.12)) 9 | (pad "" np_thru_hole circle (at 6.985 -7.0866) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 10 | (pad "" np_thru_hole circle (at 6.985 6.8834) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 11 | (pad "" np_thru_hole circle (at -6.985 6.8834) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 12 | (pad "" np_thru_hole circle (at -6.985 -7.0866) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 13 | (pad "" np_thru_hole circle (at 0 9.525) (size 3.048 3.048) (drill 3.048) (layers *.Cu *.Mask)) 14 | ) 15 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/Futaba-MD-4PCS-aligner.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Futaba-MD-4PCS-aligner (layer F.Cu) (tedit 5F3AC1C5) 2 | (fp_text reference REF** (at -3.937 -8.4074) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value MD-4PCS-aligner (at 0.1524 8.8392) (layer B.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_circle (center 0 -0.1016) (end 7.8232 -0.1016) (layer Edge.Cuts) (width 0.12)) 9 | (pad "" np_thru_hole circle (at 6.985 -7.0866) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 10 | (pad "" np_thru_hole circle (at 6.985 6.8834) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 11 | (pad "" np_thru_hole circle (at -6.985 6.8834) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 12 | (pad "" np_thru_hole circle (at -6.985 -7.0866) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 13 | ) 14 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/Futaba-MD-4PCS-aligner_tool.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Futaba-MD-4PCS-aligner_tool (layer F.Cu) (tedit 5FF914FC) 2 | (fp_text reference REF** (at -3.937 -8.3058) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value MD-4PCS-aligner (at 0.1524 8.9408) (layer B.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start -7.8232 0) (end -9.525 0) (layer Edge.Cuts) (width 0.1016)) 9 | (fp_line (start 7.8232 0) (end 9.525 0) (layer Edge.Cuts) (width 0.1016)) 10 | (fp_arc (start 0 0) (end 7.8232 0) (angle -180) (layer Edge.Cuts) (width 0.1016)) 11 | (pad "" np_thru_hole circle (at -6.985 -6.985) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 12 | (pad "" np_thru_hole circle (at 6.985 -6.985) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 13 | ) 14 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/Futaba_2u_Cherry_aligner.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Futaba_2u_Cherry_aligner (layer F.Cu) (tedit 5F3AC1EB) 2 | (fp_text reference REF** (at 0 0.4238) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value Futaba_2u_Cherry_aligner (at 0 -0.5254) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start 8.6106 6.9596) (end 19.0246 6.9596) (layer Edge.Cuts) (width 0.12)) 9 | (fp_line (start 8.6106 1.8796) (end 19.0246 1.8796) (layer Edge.Cuts) (width 0.12)) 10 | (fp_line (start 8.6106 -1.9812) (end 19.0246 -1.9812) (layer Edge.Cuts) (width 0.12)) 11 | (fp_line (start 19.0246 1.8796) (end 19.0246 6.9596) (layer Edge.Cuts) (width 0.12)) 12 | (fp_line (start 19.0246 -7.0612) (end 19.0246 -1.9812) (layer Edge.Cuts) (width 0.12)) 13 | (fp_line (start 8.6106 -7.0612) (end 19.0246 -7.0612) (layer Edge.Cuts) (width 0.12)) 14 | (fp_line (start -18.8468 6.9596) (end -8.6106 6.9596) (layer Edge.Cuts) (width 0.12)) 15 | (fp_line (start -18.8468 -7.0612) (end -18.8468 -1.9812) (layer Edge.Cuts) (width 0.12)) 16 | (fp_line (start -18.8468 1.8796) (end -8.6106 1.8796) (layer Edge.Cuts) (width 0.12)) 17 | (fp_line (start -18.8468 -1.9812) (end -8.6106 -1.9812) (layer Edge.Cuts) (width 0.12)) 18 | (fp_line (start -18.8468 1.8796) (end -18.8468 6.9596) (layer Edge.Cuts) (width 0.12)) 19 | (fp_line (start -18.8468 -7.0612) (end -8.6106 -7.0612) (layer Edge.Cuts) (width 0.12)) 20 | (fp_circle (center 0 -0.1016) (end 7.8232 -0.1016) (layer Edge.Cuts) (width 0.12)) 21 | (fp_line (start -8.6106 -7.0612) (end -8.6106 -1.9812) (layer Edge.Cuts) (width 0.12)) 22 | (fp_line (start -8.6106 1.8796) (end -8.6106 6.9596) (layer Edge.Cuts) (width 0.12)) 23 | (fp_line (start 8.6106 6.9596) (end 8.6106 1.8796) (layer Edge.Cuts) (width 0.12)) 24 | (fp_line (start 8.6106 -7.0612) (end 8.6106 -1.9812) (layer Edge.Cuts) (width 0.12)) 25 | (fp_text user SW** (at -5.334 -7.9502) (layer F.SilkS) 26 | (effects (font (size 1 1) (thickness 0.15))) 27 | ) 28 | (fp_text user Futaba_2u_Cherry_aligner (at 0 -0.5508) (layer F.Fab) 29 | (effects (font (size 1 1) (thickness 0.15))) 30 | ) 31 | (fp_text user REF** (at 0 0.3984) (layer F.SilkS) 32 | (effects (font (size 1 1) (thickness 0.15))) 33 | ) 34 | (fp_text user SW** (at -5.334 -7.9756) (layer F.SilkS) 35 | (effects (font (size 1 1) (thickness 0.15))) 36 | ) 37 | (fp_text user MX_space_aligner (at -0.6096 7.8232) (layer B.Fab) 38 | (effects (font (size 1 1) (thickness 0.15))) 39 | ) 40 | (fp_text user SW** (at -5.334 -7.9756) (layer F.SilkS) 41 | (effects (font (size 1 1) (thickness 0.15))) 42 | ) 43 | (fp_text user MX_space_aligner (at -0.6096 7.8232) (layer B.Fab) 44 | (effects (font (size 1 1) (thickness 0.15))) 45 | ) 46 | (pad "" np_thru_hole circle (at 6.985 -7.0866) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 47 | (pad "" np_thru_hole circle (at 6.985 6.8834) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 48 | (pad "" np_thru_hole circle (at -6.985 6.8834) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 49 | (pad "" np_thru_hole circle (at -6.985 -7.0866) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 50 | (pad "" np_thru_hole oval (at -11.938 -0.1016) (size 5 2) (drill oval 5 2) (layers *.Cu *.Mask)) 51 | (pad "" np_thru_hole oval (at 11.938 -0.1016) (size 5 2) (drill oval 5 2) (layers *.Cu *.Mask)) 52 | ) 53 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/Futaba_space_Cherry_aligner.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Futaba_space_Cherry_aligner (layer F.Cu) (tedit 5F3AC207) 2 | (fp_text reference SW** (at -5.334 -7.9756) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value MX_space_aligner (at -0.6096 7.8232) (layer B.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_circle (center 0 -0.1016) (end 7.8232 -0.1016) (layer Edge.Cuts) (width 0.12)) 9 | (fp_line (start -73.66 -7.0358) (end -73.66 -1.9558) (layer Edge.Cuts) (width 0.12)) 10 | (fp_line (start -73.66 -7.0358) (end -59.69 -7.0358) (layer Edge.Cuts) (width 0.12)) 11 | (fp_line (start -73.66 6.9342) (end -59.69 6.9342) (layer Edge.Cuts) (width 0.12)) 12 | (fp_line (start 59.69 -7.0358) (end 73.66 -7.0358) (layer Edge.Cuts) (width 0.12)) 13 | (fp_line (start 59.69 6.9342) (end 73.66 6.9342) (layer Edge.Cuts) (width 0.12)) 14 | (fp_line (start -73.66 1.8542) (end -59.69 1.8542) (layer Edge.Cuts) (width 0.12)) 15 | (fp_line (start -73.66 -1.9558) (end -59.69 -1.9558) (layer Edge.Cuts) (width 0.12)) 16 | (fp_line (start -73.66 1.8542) (end -73.66 6.9342) (layer Edge.Cuts) (width 0.12)) 17 | (fp_line (start -59.69 1.8542) (end -59.69 6.9342) (layer Edge.Cuts) (width 0.12)) 18 | (fp_line (start -59.69 -7.0358) (end -59.69 -1.9558) (layer Edge.Cuts) (width 0.12)) 19 | (fp_line (start 59.69 1.8542) (end 59.69 6.9342) (layer Edge.Cuts) (width 0.12)) 20 | (fp_line (start 73.66 -7.0358) (end 73.66 -1.9558) (layer Edge.Cuts) (width 0.12)) 21 | (fp_line (start 59.69 -7.0358) (end 59.69 -1.9558) (layer Edge.Cuts) (width 0.12)) 22 | (fp_line (start 73.66 1.8542) (end 73.66 6.9342) (layer Edge.Cuts) (width 0.12)) 23 | (fp_line (start 59.69 -1.9558) (end 73.66 -1.9558) (layer Edge.Cuts) (width 0.12)) 24 | (fp_line (start 59.69 1.8542) (end 73.66 1.8542) (layer Edge.Cuts) (width 0.12)) 25 | (fp_text user REF** (at 0 0.3984) (layer F.SilkS) 26 | (effects (font (size 1 1) (thickness 0.15))) 27 | ) 28 | (fp_text user Futaba_2u_Cherry_aligner (at 0 -0.6016) (layer F.Fab) 29 | (effects (font (size 1 1) (thickness 0.15))) 30 | ) 31 | (fp_text user SW** (at -5.334 -7.9756) (layer F.SilkS) 32 | (effects (font (size 1 1) (thickness 0.15))) 33 | ) 34 | (fp_text user MX_space_aligner (at -0.6096 7.8232) (layer B.Fab) 35 | (effects (font (size 1 1) (thickness 0.15))) 36 | ) 37 | (pad "" np_thru_hole circle (at 6.985 6.8834) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 38 | (pad "" np_thru_hole circle (at 6.985 -7.0866) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 39 | (pad "" np_thru_hole circle (at -6.985 -7.0866) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 40 | (pad "" np_thru_hole circle (at -6.985 6.8834) (size 1.6256 1.6256) (drill 1.6256) (layers *.Cu *.Mask)) 41 | (pad "" np_thru_hole oval (at -66.675 -0.1016) (size 5 2) (drill oval 5 2) (layers *.Cu *.Mask)) 42 | (pad "" np_thru_hole oval (at 66.675 -0.1016) (size 5 2) (drill oval 5 2) (layers *.Cu *.Mask)) 43 | ) 44 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/Key_MX.kicad_mod: -------------------------------------------------------------------------------- 1 | (footprint "Key_MX" (version 20211014) (generator pcbnew) 2 | (layer "F.Cu") 3 | (tedit 5FEE0FFF) 4 | (attr through_hole) 5 | (fp_text reference "SW_**" (at -5.7912 -8.6106) (layer "F.SilkS") 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | (tstamp 4b917266-b616-4b34-b81a-54ed0ba2cc45) 8 | ) 9 | (fp_text value "Key_MX" (at -5.334 8.6614) (layer "F.SilkS") 10 | (effects (font (size 1 1) (thickness 0.15))) 11 | (tstamp fded6696-7d51-4dd5-8ea2-90f4b4eea8db) 12 | ) 13 | (fp_line (start -7.6962 -7.874) (end 7.6962 -7.874) (layer "F.CrtYd") (width 0.12) (tstamp 2a6d0c3c-f5d2-49c8-a5d7-8e4c346deef1)) 14 | (fp_line (start 7.6962 -7.874) (end 7.6962 7.874) (layer "F.CrtYd") (width 0.12) (tstamp 7787030c-1f3e-482b-94d0-35e959f33ad4)) 15 | (fp_line (start 7.6962 7.874) (end -7.6962 7.874) (layer "F.CrtYd") (width 0.12) (tstamp b5acfe42-7ec2-4b59-8af6-0a75a8353d47)) 16 | (fp_line (start -7.6962 7.874) (end -7.6962 -7.874) (layer "F.CrtYd") (width 0.12) (tstamp ca918f73-1d40-4cc8-a02a-3cf113953dd5)) 17 | (pad "" np_thru_hole circle (at 0 0.1016) (size 3.9878 3.9878) (drill 3.9878) (layers *.Cu *.Mask) 18 | (solder_mask_margin 0.0762) (tstamp 7b85e4ed-78c5-4ee2-8bda-0e2cdc7d855b)) 19 | (pad "" np_thru_hole circle (at 5.08 0.1016) (size 1.7018 1.7018) (drill 1.7018) (layers *.Cu *.Mask) 20 | (solder_mask_margin 0.0762) (tstamp 994defad-7352-4f5b-adbb-4935eaff1c63)) 21 | (pad "" np_thru_hole circle (at -5.08 0.1016) (size 1.7018 1.7018) (drill 1.7018) (layers *.Cu *.Mask) 22 | (solder_mask_margin 0.0762) (tstamp bf0770ca-f766-4af6-8464-833c391420fc)) 23 | (pad "1" thru_hole circle (at 2.54 -4.9784) (size 2.2352 2.2352) (drill 1.5748) (layers *.Cu *.Mask) (tstamp 1975c8c2-144e-448a-a812-9b2433471950)) 24 | (pad "1" thru_hole custom (at 0 -4.1021) (size 2.2352 2.2352) (drill 1.397) (layers *.Cu *.Mask) 25 | (options (clearance outline) (anchor circle)) 26 | (primitives 27 | (gr_line (start 0.0508 0.0381) (end 2.6162 -0.9779) (width 0.2)) 28 | ) (tstamp aeda8d04-e983-4be2-b06d-f5f00510885e)) 29 | (pad "2" thru_hole circle (at 0 3.8989) (size 2.2352 2.2352) (drill 1.397) (layers *.Cu *.Mask) (tstamp 6fe4676a-4801-4b83-afbe-c228f5746fad)) 30 | (pad "2" thru_hole custom (at -3.81 -2.4384) (size 2.2352 2.2352) (drill 1.5748) (layers *.Cu *.Mask) 31 | (options (clearance outline) (anchor circle)) 32 | (primitives 33 | (gr_line (start 0 -0.0254) (end 0.9398 4.0132) (width 0.2)) 34 | (gr_line (start 0.9398 4.0132) (end 3.8354 6.3373) (width 0.2)) 35 | ) (tstamp fe3bd807-98a2-44e9-9eb1-1ffca908639e)) 36 | (model "${PROJECT_PATH}/cherry_mx.wrl" 37 | (offset (xyz 0 0 0)) 38 | (scale (xyz 1 1 1)) 39 | (rotate (xyz 0 0 0)) 40 | ) 41 | ) 42 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/Key_MX_2u.kicad_mod: -------------------------------------------------------------------------------- 1 | (footprint "Key_MX_2u" (version 20221018) (generator pcbnew) 2 | (layer "F.Cu") 3 | (attr through_hole) 4 | (fp_text reference "REF**" (at -5.969 -8.763) (layer "F.SilkS") 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | (tstamp ef580378-1c67-483e-b6a4-196c840de987) 7 | ) 8 | (fp_text value "Key_MX_2u" (at 0 -0.5) (layer "F.Fab") hide 9 | (effects (font (size 1 1) (thickness 0.15))) 10 | (tstamp 882d61db-a3a1-483d-8bae-6904ccf5577f) 11 | ) 12 | (fp_line (start -7.6962 -7.874) (end 7.6962 -7.874) 13 | (stroke (width 0.12) (type solid)) (layer "F.CrtYd") (tstamp a6b82f97-c99f-4d3e-a8db-5e9fabe9cb87)) 14 | (fp_line (start -7.6962 7.874) (end -7.6962 -7.874) 15 | (stroke (width 0.12) (type solid)) (layer "F.CrtYd") (tstamp c53f1097-47a2-4400-92f1-ba0dd0fd5dc7)) 16 | (fp_line (start 7.6962 -7.874) (end 7.6962 7.874) 17 | (stroke (width 0.12) (type solid)) (layer "F.CrtYd") (tstamp 5ab15849-d45f-4603-bff9-be4c05db142c)) 18 | (fp_line (start 7.6962 7.874) (end -7.6962 7.874) 19 | (stroke (width 0.12) (type solid)) (layer "F.CrtYd") (tstamp 510742c1-8093-4709-8b84-6f5331fc1e88)) 20 | (pad "" np_thru_hole circle (at -11.938 -6.8834) (size 3.048 3.048) (drill 3.048) (layers "*.Cu" "*.Mask") (tstamp b46c31b9-521a-4471-859e-19e3c06da819)) 21 | (pad "" np_thru_hole oval (at -11.938 -0.1016) (size 5 2) (drill oval 5 2) (layers "*.Cu" "*.Mask") (tstamp 788d6ce6-802b-4840-8439-f00251eab8c6)) 22 | (pad "" np_thru_hole circle (at -11.938 8.3566) (size 3.9878 3.9878) (drill 3.9878) (layers "*.Cu" "*.Mask") (tstamp a4ea0922-9f63-44c9-a721-3ad2329bb434)) 23 | (pad "" np_thru_hole circle (at -5.08 0.1016) (size 1.7018 1.7018) (drill 1.7018) (layers "*.Cu" "*.Mask") 24 | (solder_mask_margin 0.0762) (tstamp be0a5daf-f849-476c-a808-1428a796cb47)) 25 | (pad "" np_thru_hole circle (at 0 0.1016) (size 3.9878 3.9878) (drill 3.9878) (layers "*.Cu" "*.Mask") 26 | (solder_mask_margin 0.0762) (tstamp fb3e655c-0cf0-4011-a61a-43c06a464bdf)) 27 | (pad "" np_thru_hole circle (at 5.08 0.1016) (size 1.7018 1.7018) (drill 1.7018) (layers "*.Cu" "*.Mask") 28 | (solder_mask_margin 0.0762) (tstamp 17c722fe-9e72-4e46-875e-a940f31bc49d)) 29 | (pad "" np_thru_hole circle (at 11.938 -6.8834) (size 3.048 3.048) (drill 3.048) (layers "*.Cu" "*.Mask") (tstamp eba0dbcc-4657-4b6c-bbd1-4fa1b02dd1ec)) 30 | (pad "" np_thru_hole oval (at 11.938 -0.1016) (size 5 2) (drill oval 5 2) (layers "*.Cu" "*.Mask") (tstamp 0ec215f2-8b67-4fe6-9b62-c2ac7b895686)) 31 | (pad "" np_thru_hole circle (at 11.938 8.3566) (size 3.9878 3.9878) (drill 3.9878) (layers "*.Cu" "*.Mask") (tstamp effe77f8-9977-4f9c-bd4a-c8efb40c32a6)) 32 | (pad "1" thru_hole custom (at 0 -4.1021) (size 2.2352 2.2352) (drill 1.397) (layers "*.Cu" "*.Mask") 33 | (thermal_bridge_angle 45) 34 | (options (clearance outline) (anchor circle)) 35 | (primitives 36 | (gr_line (start 1.27 -0.9779) (end 0.7366 -0.5715) (width 0.3048)) 37 | (gr_line (start 1.651 -0.9779) (end 1.27 -0.9779) (width 0.3048)) 38 | ) (tstamp 7ff7993c-bbaa-46af-a8d5-d37727a21d34)) 39 | (pad "1" thru_hole circle (at 2.54 -4.9784) (size 2.2352 2.2352) (drill 1.5748) (layers "*.Cu" "*.Mask") (tstamp 1d1fa26e-d11b-4aed-8dc5-740665250511)) 40 | (pad "2" thru_hole custom (at -3.81 -2.4384) (size 2.2352 2.2352) (drill 1.5748) (layers "*.Cu" "*.Mask") 41 | (thermal_bridge_angle 45) 42 | (options (clearance outline) (anchor circle)) 43 | (primitives 44 | (gr_line (start 0 -0.1016) (end 1.27 2.4384) (width 0.3048)) 45 | (gr_line (start 1.27 2.4384) (end 1.27 3.7084) (width 0.3048)) 46 | (gr_line (start 1.27 3.7084) (end 3.81 6.2484) (width 0.3048)) 47 | ) (tstamp aa78c580-43ee-4a9b-84d1-f225054b7891)) 48 | (pad "2" thru_hole circle (at 0 3.8989) (size 2.2352 2.2352) (drill 1.397) (layers "*.Cu" "*.Mask") (tstamp 2908a3a4-df35-402c-ab9f-a269756efcb1)) 49 | ) 50 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/Key_MX_Aligner.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Key_MX_Aligner (layer F.Cu) (tedit 5F3AC0E5) 2 | (fp_text reference REF** (at -5.0292 -7.7724) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value Key_MX_Aligner (at 0 7.9756) (layer B.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start -6.985 -6.8834) (end -6.985 7.0866) (layer Edge.Cuts) (width 0.12)) 9 | (fp_line (start 6.985 7.0866) (end 6.985 -6.8834) (layer Edge.Cuts) (width 0.12)) 10 | (fp_line (start -6.985 -6.8834) (end 6.985 -6.8834) (layer Edge.Cuts) (width 0.12)) 11 | (fp_line (start -6.985 7.0866) (end 6.985 7.0866) (layer Edge.Cuts) (width 0.12)) 12 | ) 13 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/Key_MX_Aligner_tool.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Key_MX_Aligner_tool (layer F.Cu) (tedit 5FF919FD) 2 | (fp_text reference REF** (at -5.0292 -7.7724) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value Key_MX_Aligner (at 0 7.9756) (layer B.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start -6.985 -6.8834) (end -6.985 7.0866) (layer Edge.Cuts) (width 0.1016)) 9 | (fp_line (start 6.985 7.0866) (end 6.985 -6.8834) (layer Edge.Cuts) (width 0.1016)) 10 | (fp_line (start -6.985 -6.8834) (end 6.985 -6.8834) (layer Edge.Cuts) (width 0.1016)) 11 | ) 12 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/Key_MX_LED.kicad_mod: -------------------------------------------------------------------------------- 1 | (footprint "Key_MX_LED" (version 20221018) (generator pcbnew) 2 | (layer "F.Cu") 3 | (attr through_hole) 4 | (fp_text reference "SW_**" (at -5.7912 -8.6106) (layer "F.SilkS") 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | (tstamp 635addc9-1212-4dd8-9025-d46a1478049c) 7 | ) 8 | (fp_text value "Key_MX" (at -5.334 8.6614) (layer "F.SilkS") 9 | (effects (font (size 1 1) (thickness 0.15))) 10 | (tstamp 62fcada6-d502-422d-ace5-51c40c4111e6) 11 | ) 12 | (fp_line (start -0.889 7.239) (end 0.635 7.239) 13 | (stroke (width 0.1016) (type solid)) (layer "F.SilkS") (tstamp 27d3534d-16f5-4ccf-9b16-2c5732c06b4d)) 14 | (fp_line (start 0.127 6.858) (end 0.127 7.62) 15 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp a988bd6f-305a-49e4-a300-383210fe668e)) 16 | (fp_poly 17 | (pts 18 | (xy 0.127 7.239) 19 | (xy -0.381 7.493) 20 | (xy -0.381 6.985) 21 | ) 22 | 23 | (stroke (width 0.1) (type solid)) (fill solid) (layer "F.SilkS") (tstamp 8d7c4863-decc-41fb-bc0f-c15564084732)) 24 | (fp_line (start -7.6962 -7.874) (end 7.6962 -7.874) 25 | (stroke (width 0.12) (type solid)) (layer "F.CrtYd") (tstamp 6a78f426-b0f1-4a10-8b9d-203792afdc98)) 26 | (fp_line (start -7.6962 7.874) (end -7.6962 -7.874) 27 | (stroke (width 0.12) (type solid)) (layer "F.CrtYd") (tstamp 1fe7f185-5c1e-4d8f-8a18-abb08d1a1e13)) 28 | (fp_line (start 7.6962 -7.874) (end 7.6962 7.874) 29 | (stroke (width 0.12) (type solid)) (layer "F.CrtYd") (tstamp cb063ba2-ba75-4d81-b6d1-01cb2c49d8e0)) 30 | (fp_line (start 7.6962 7.874) (end -7.6962 7.874) 31 | (stroke (width 0.12) (type solid)) (layer "F.CrtYd") (tstamp ad0afc42-584d-444a-a5d4-943137df2635)) 32 | (pad "" np_thru_hole circle (at -5.08 0.1016) (size 1.7018 1.7018) (drill 1.7018) (layers "*.Cu" "*.Mask") 33 | (solder_mask_margin 0.0762) (tstamp e2074221-7a62-47e7-bcd1-2b33b1dec304)) 34 | (pad "" np_thru_hole circle (at 0 0.1016) (size 3.9878 3.9878) (drill 3.9878) (layers "*.Cu" "*.Mask") 35 | (solder_mask_margin 0.0762) (tstamp 880b494c-ee53-4f2b-8304-722863728cc3)) 36 | (pad "" np_thru_hole circle (at 5.08 0.1016) (size 1.7018 1.7018) (drill 1.7018) (layers "*.Cu" "*.Mask") 37 | (solder_mask_margin 0.0762) (tstamp acbb9c7e-a35c-43a0-a03c-5ae34b790b3c)) 38 | (pad "1" thru_hole custom (at 0 -4.1021) (size 2.2352 2.2352) (drill 1.397) (layers "*.Cu" "*.Mask") 39 | (thermal_bridge_angle 45) 40 | (options (clearance outline) (anchor circle)) 41 | (primitives 42 | (gr_line (start 0 0) (end 2.54 -0.8763) (width 0.2)) 43 | ) (tstamp 0b082f28-afa4-4577-beca-640eeac5c49e)) 44 | (pad "1" thru_hole circle (at 2.54 -4.9784) (size 2.2352 2.2352) (drill 1.5748) (layers "*.Cu" "*.Mask") (tstamp d3fbc779-09ec-46c9-8185-2a56ff83e138)) 45 | (pad "2" thru_hole custom (at -3.81 -2.4384) (size 2.2352 2.2352) (drill 1.5748) (layers "*.Cu" "*.Mask") 46 | (thermal_bridge_angle 45) 47 | (options (clearance outline) (anchor circle)) 48 | (primitives 49 | (gr_line (start 0 1.1176) (end 1.016 4.8768) (width 0.2)) 50 | (gr_line (start 1.016 4.8768) (end 3.81 6.3373) (width 0.2)) 51 | ) (tstamp 43d16884-4b85-467f-a465-e8dd4ccd8dea)) 52 | (pad "2" thru_hole circle (at 0 3.8989) (size 1.651 1.651) (drill 1.397) (layers "*.Cu" "*.Mask") (tstamp 3624f8ff-2425-4b82-a6fc-b0ddd7bfdf00)) 53 | (pad "3" thru_hole circle (at -1.27 5.1816) (size 1.27 1.27) (drill 1.0668) (layers "*.Cu" "*.Mask") (tstamp 4950c0a2-1f71-4d4a-ba69-985f703a991e)) 54 | (pad "4" thru_hole circle (at 1.27 5.1816) (size 1.27 1.27) (drill 1.0668) (layers "*.Cu" "*.Mask") (tstamp 5d7bfcfa-2c97-4dd7-ae44-67b45a5f8d95)) 55 | ) 56 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/Key_MX_Spacebar_5.25.kicad_mod: -------------------------------------------------------------------------------- 1 | (footprint "Key_MX_Spacebar_5.25" (version 20221018) (generator pcbnew) 2 | (layer "F.Cu") 3 | (attr through_hole) 4 | (fp_text reference "SW_**" (at -5.7912 -8.5852) (layer "F.SilkS") 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | (tstamp 3a4b3c9f-5a78-470d-8c5d-b5f4aa152a6d) 7 | ) 8 | (fp_text value "Key_MX" (at -5.334 8.6868) (layer "F.SilkS") 9 | (effects (font (size 1 1) (thickness 0.15))) 10 | (tstamp c0abd6cb-d499-4a23-8a26-7e833b7aa18f) 11 | ) 12 | (fp_line (start -7.6962 -7.874) (end 7.6962 -7.874) 13 | (stroke (width 0.12) (type solid)) (layer "F.CrtYd") (tstamp 9edc424b-8ac8-4542-9d30-21889df7e278)) 14 | (fp_line (start -7.6962 7.874) (end -7.6962 -7.874) 15 | (stroke (width 0.12) (type solid)) (layer "F.CrtYd") (tstamp a034633c-6fdb-4372-9631-e68dfb5fe4f1)) 16 | (fp_line (start 7.6962 -7.874) (end 7.6962 7.874) 17 | (stroke (width 0.12) (type solid)) (layer "F.CrtYd") (tstamp 4f4e4819-a0de-4e7f-b014-428b73df796f)) 18 | (fp_line (start 7.6962 7.874) (end -7.6962 7.874) 19 | (stroke (width 0.12) (type solid)) (layer "F.CrtYd") (tstamp 06dda447-7a5e-4c5a-88c9-3c9bb09d6e14)) 20 | (pad "" np_thru_hole circle (at -66.675 -6.8834) (size 3.048 3.048) (drill 3.048) (layers "*.Cu" "*.Mask") (tstamp d9d9da93-63be-4c28-8943-5f7bb4b31b89)) 21 | (pad "" np_thru_hole oval (at -66.675 -0.1016) (size 5 2) (drill oval 5 2) (layers "*.Cu" "*.Mask") (tstamp 4144a7bb-554b-49fa-b00f-adfc56c5d0f6)) 22 | (pad "" np_thru_hole circle (at -66.675 8.3566) (size 3.9878 3.9878) (drill 3.9878) (layers "*.Cu" "*.Mask") (tstamp 3044c4fa-3589-48a0-a921-7945035047cb)) 23 | (pad "" np_thru_hole circle (at -5.08 0.1016) (size 1.7018 1.7018) (drill 1.7018) (layers "*.Cu" "*.Mask") 24 | (solder_mask_margin 0.0762) (tstamp d8278fee-7397-4054-875a-6bbcc89a9eb4)) 25 | (pad "" np_thru_hole circle (at 0 0.1016) (size 3.9878 3.9878) (drill 3.9878) (layers "*.Cu" "*.Mask") 26 | (solder_mask_margin 0.0762) (tstamp 06d817f3-2973-4ab5-9b4b-16299101116f)) 27 | (pad "" np_thru_hole circle (at 5.08 0.1016) (size 1.7018 1.7018) (drill 1.7018) (layers "*.Cu" "*.Mask") 28 | (solder_mask_margin 0.0762) (tstamp d7115bbe-51ca-4b7d-ba87-004da4841551)) 29 | (pad "" np_thru_hole circle (at 66.675 -6.8834) (size 3.048 3.048) (drill 3.048) (layers "*.Cu" "*.Mask") (tstamp abba95bf-bbd5-4fa8-9287-1625ee918451)) 30 | (pad "" np_thru_hole oval (at 66.675 -0.1016) (size 5 2) (drill oval 5 2) (layers "*.Cu" "*.Mask") (tstamp fe0a93c6-4511-4863-b3c0-0da3d1f25efb)) 31 | (pad "" np_thru_hole circle (at 66.675 8.3566) (size 3.9878 3.9878) (drill 3.9878) (layers "*.Cu" "*.Mask") (tstamp 1f64c2fa-89ce-4835-bfa2-b9790d679f3f)) 32 | (pad "1" thru_hole custom (at 0 -4.1021) (size 2.2352 2.2352) (drill 1.397) (layers "*.Cu" "*.Mask") 33 | (thermal_bridge_angle 45) 34 | (options (clearance outline) (anchor circle)) 35 | (primitives 36 | (gr_line (start 0 0) (end 2.54 -0.8763) (width 0.2)) 37 | ) (tstamp ddbd1858-51f8-422b-8170-2a124a0465c5)) 38 | (pad "1" thru_hole circle (at 2.54 -4.9784) (size 2.2352 2.2352) (drill 1.5748) (layers "*.Cu" "*.Mask") (tstamp ef9e95f6-dc87-4c29-b66f-23ffb6cdd527)) 39 | (pad "2" thru_hole custom (at -3.81 -2.4384) (size 2.2352 2.2352) (drill 1.5748) (layers "*.Cu" "*.Mask") 40 | (thermal_bridge_angle 45) 41 | (options (clearance outline) (anchor circle)) 42 | (primitives 43 | (gr_line (start 0 0) (end 1.27 4.9784) (width 0.2)) 44 | (gr_line (start 1.27 4.9784) (end 3.81 6.3373) (width 0.2)) 45 | ) (tstamp 3956ad20-646c-4f1c-8364-b46ce6e8171a)) 46 | (pad "2" thru_hole circle (at 0 3.8989) (size 2.2352 2.2352) (drill 1.397) (layers "*.Cu" "*.Mask") (tstamp 7882c9ea-c66b-4e82-b1f7-7d2c71b447ea)) 47 | (model "${PROJECT_PATH}/cherry_mx.wrl" 48 | (offset (xyz 0 0 0)) 49 | (scale (xyz 1 1 1)) 50 | (rotate (xyz 0 0 0)) 51 | ) 52 | ) 53 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/MX_2u_aligner.kicad_mod: -------------------------------------------------------------------------------- 1 | (module MX_2u_aligner (layer F.Cu) (tedit 5F3AC141) 2 | (fp_text reference REF** (at 0 0.5254) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value MX_2u_aligner (at 0 -0.4746) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start 6.985 5.9182) (end 8.6106 5.9182) (layer Edge.Cuts) (width 0.12)) 9 | (fp_line (start 6.985 -4.699) (end 8.6106 -4.699) (layer Edge.Cuts) (width 0.12)) 10 | (fp_line (start -8.6106 -4.699) (end -6.985 -4.699) (layer Edge.Cuts) (width 0.12)) 11 | (fp_line (start -8.6106 5.9182) (end -6.985 5.9182) (layer Edge.Cuts) (width 0.12)) 12 | (fp_line (start 15.2654 -5.588) (end 15.2654 -2.2606) (layer Edge.Cuts) (width 0.12)) 13 | (fp_line (start 15.2654 -2.2606) (end 16.129 -2.2606) (layer Edge.Cuts) (width 0.12)) 14 | (fp_line (start 16.129 -2.2606) (end 16.129 0.5334) (layer Edge.Cuts) (width 0.12)) 15 | (fp_line (start 16.129 0.5334) (end 15.2654 0.5334) (layer Edge.Cuts) (width 0.12)) 16 | (fp_line (start 15.2654 0.5334) (end 15.2654 6.7056) (layer Edge.Cuts) (width 0.12)) 17 | (fp_line (start 15.2654 6.7056) (end 13.462 6.7056) (layer Edge.Cuts) (width 0.12)) 18 | (fp_line (start 13.462 6.7056) (end 13.462 7.7978) (layer Edge.Cuts) (width 0.12)) 19 | (fp_line (start 6.985 -6.8834) (end 6.985 -4.699) (layer Edge.Cuts) (width 0.12)) 20 | (fp_line (start 8.6106 -5.588) (end 15.2654 -5.588) (layer Edge.Cuts) (width 0.12)) 21 | (fp_line (start 8.6106 -4.699) (end 8.6106 -5.588) (layer Edge.Cuts) (width 0.12)) 22 | (fp_line (start 13.462 7.7978) (end 10.414 7.7978) (layer Edge.Cuts) (width 0.12)) 23 | (fp_line (start 10.414 7.7978) (end 10.414 6.7056) (layer Edge.Cuts) (width 0.12)) 24 | (fp_line (start 10.414 6.7056) (end 8.6106 6.7056) (layer Edge.Cuts) (width 0.12)) 25 | (fp_line (start 8.6106 6.7056) (end 8.6106 5.9182) (layer Edge.Cuts) (width 0.12)) 26 | (fp_line (start 6.985 5.9182) (end 6.985 7.0866) (layer Edge.Cuts) (width 0.12)) 27 | (fp_line (start 6.985 7.0866) (end -6.985 7.0866) (layer Edge.Cuts) (width 0.12)) 28 | (fp_line (start -6.985 7.0866) (end -6.985 5.9182) (layer Edge.Cuts) (width 0.12)) 29 | (fp_line (start -8.6106 5.9182) (end -8.6106 6.7056) (layer Edge.Cuts) (width 0.12)) 30 | (fp_line (start -8.6106 6.7056) (end -10.414 6.7056) (layer Edge.Cuts) (width 0.12)) 31 | (fp_line (start -10.414 6.7056) (end -10.414 7.7978) (layer Edge.Cuts) (width 0.12)) 32 | (fp_line (start -10.414 7.7978) (end -13.462 7.7978) (layer Edge.Cuts) (width 0.12)) 33 | (fp_line (start -13.462 7.7978) (end -13.462 6.7056) (layer Edge.Cuts) (width 0.12)) 34 | (fp_line (start -13.462 6.7056) (end -15.2654 6.7056) (layer Edge.Cuts) (width 0.12)) 35 | (fp_line (start -15.2654 6.7056) (end -15.2654 0.5334) (layer Edge.Cuts) (width 0.12)) 36 | (fp_line (start -15.2654 0.5334) (end -16.129 0.5334) (layer Edge.Cuts) (width 0.12)) 37 | (fp_line (start -16.129 0.5334) (end -16.129 -2.2606) (layer Edge.Cuts) (width 0.12)) 38 | (fp_line (start -16.129 -2.2606) (end -15.2654 -2.2606) (layer Edge.Cuts) (width 0.12)) 39 | (fp_line (start -15.2654 -2.2606) (end -15.2654 -5.588) (layer Edge.Cuts) (width 0.12)) 40 | (fp_line (start -15.2654 -5.588) (end -8.6106 -5.588) (layer Edge.Cuts) (width 0.12)) 41 | (fp_line (start -8.6106 -5.588) (end -8.6106 -4.699) (layer Edge.Cuts) (width 0.12)) 42 | (fp_line (start -6.985 -4.699) (end -6.985 -6.8834) (layer Edge.Cuts) (width 0.12)) 43 | (fp_line (start -6.985 -6.8834) (end 6.985 -6.8834) (layer Edge.Cuts) (width 0.12)) 44 | (fp_text user MX_space_aligner (at -0.6096 7.9502) (layer B.Fab) 45 | (effects (font (size 1 1) (thickness 0.15))) 46 | ) 47 | (fp_text user SW** (at -5.334 -7.6454) (layer F.SilkS) 48 | (effects (font (size 1 1) (thickness 0.15))) 49 | ) 50 | ) 51 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/MX_space_align.mod: -------------------------------------------------------------------------------- 1 | (module "Cherry aligner" (layer F.Cu) (tedit 5D993F00) 2 | (fp_text reference "REF**" (at -3.81 -6.858) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value "Cherry aligner" (at -0.508 6.985) (layer B.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start -5.715 -5.715) (end -5.715 5.715) (layer Edge.Cuts) (width 0.12)) 9 | (fp_line (start 5.715 5.715) (end 5.715 -5.715) (layer Edge.Cuts) (width 0.12)) 10 | (fp_line (start -5.715 -5.715) (end 5.715 -5.715) (layer Edge.Cuts) (width 0.12)) 11 | (fp_line (start -5.715 5.715) (end 5.715 5.715) (layer Edge.Cuts) (width 0.12)) 12 | ) 13 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/MX_space_aligner.kicad_mod: -------------------------------------------------------------------------------- 1 | (module MX_space_aligner (layer F.Cu) (tedit 5F3AC176) 2 | (fp_text reference SW** (at -5.334 -7.7724) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value MX_space_aligner (at -0.6096 8.0264) (layer B.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start 59.69 -6.8834) (end 59.69 7.0866) (layer Edge.Cuts) (width 0.12)) 9 | (fp_line (start 73.66 7.0866) (end 73.66 -6.8834) (layer Edge.Cuts) (width 0.12)) 10 | (fp_line (start 59.69 -6.8834) (end 73.66 -6.8834) (layer Edge.Cuts) (width 0.12)) 11 | (fp_line (start 59.69 7.0866) (end 73.66 7.0866) (layer Edge.Cuts) (width 0.12)) 12 | (fp_line (start -59.69 7.0866) (end -59.69 -6.8834) (layer Edge.Cuts) (width 0.12)) 13 | (fp_line (start -73.66 7.0866) (end -59.69 7.0866) (layer Edge.Cuts) (width 0.12)) 14 | (fp_line (start -73.66 -6.8834) (end -59.69 -6.8834) (layer Edge.Cuts) (width 0.12)) 15 | (fp_line (start -73.66 -6.8834) (end -73.66 7.0866) (layer Edge.Cuts) (width 0.12)) 16 | (fp_line (start -6.985 7.0866) (end 6.985 7.0866) (layer Edge.Cuts) (width 0.12)) 17 | (fp_line (start -6.985 -6.8834) (end -6.985 7.0866) (layer Edge.Cuts) (width 0.12)) 18 | (fp_line (start 6.985 7.0866) (end 6.985 -6.8834) (layer Edge.Cuts) (width 0.12)) 19 | (fp_line (start -6.985 -6.8834) (end 6.985 -6.8834) (layer Edge.Cuts) (width 0.12)) 20 | (fp_text user MX_space_aligner (at 66.0654 8.0264) (layer B.Fab) 21 | (effects (font (size 1 1) (thickness 0.15))) 22 | ) 23 | (fp_text user SW** (at 61.341 -7.7724) (layer F.SilkS) 24 | (effects (font (size 1 1) (thickness 0.15))) 25 | ) 26 | ) 27 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/MountingHole_3.5mm.kicad_mod: -------------------------------------------------------------------------------- 1 | (module MountingHole_3.5mm (layer F.Cu) (tedit 56D1B4CB) 2 | (descr "Mounting Hole 3.5mm, no annular") 3 | (tags "mounting hole 3.5mm no annular") 4 | (attr virtual) 5 | (fp_text reference REF** (at 0 -4.5) (layer F.SilkS) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_text value MountingHole_3.5mm (at 0 4.5) (layer F.Fab) 9 | (effects (font (size 1 1) (thickness 0.15))) 10 | ) 11 | (fp_circle (center 0 0) (end 3.75 0) (layer F.CrtYd) (width 0.05)) 12 | (fp_circle (center 0 0) (end 3.5 0) (layer Cmts.User) (width 0.15)) 13 | (fp_text user %R (at 0.3 0) (layer F.Fab) 14 | (effects (font (size 1 1) (thickness 0.15))) 15 | ) 16 | (pad 1 np_thru_hole circle (at 0 0) (size 3.5 3.5) (drill 3.5) (layers *.Cu *.Mask)) 17 | ) 18 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/OSI_spacer_holes.kicad_mod: -------------------------------------------------------------------------------- 1 | (module OSI_spacer_holes (layer F.Cu) (tedit 5EF57A9B) 2 | (fp_text reference REF** (at 0 0.5) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value "OSI mounting holes" (at 0 -0.5) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start 104.14 -87.63) (end 104.14 -102.87) (layer F.CrtYd) (width 0.12)) 9 | (fp_line (start 104.14 -87.63) (end 114.3 -87.63) (layer F.CrtYd) (width 0.12)) 10 | (fp_line (start 114.3 -102.87) (end 114.3 -87.63) (layer F.CrtYd) (width 0.12)) 11 | (fp_line (start 104.14 -102.87) (end 114.3 -102.87) (layer F.CrtYd) (width 0.12)) 12 | (fp_line (start -114.3 -87.63) (end -114.3 -102.87) (layer F.CrtYd) (width 0.12)) 13 | (fp_line (start -114.3 -87.63) (end -104.14 -87.63) (layer F.CrtYd) (width 0.12)) 14 | (fp_line (start -104.14 -102.87) (end -104.14 -87.63) (layer F.CrtYd) (width 0.12)) 15 | (fp_line (start -114.3 -102.87) (end -104.14 -102.87) (layer F.CrtYd) (width 0.12)) 16 | (fp_line (start -5.08 -87.7824) (end -5.08 -103.0224) (layer F.CrtYd) (width 0.12)) 17 | (fp_line (start -5.08 -87.7824) (end 5.08 -87.7824) (layer F.CrtYd) (width 0.12)) 18 | (fp_line (start 5.08 -103.0224) (end 5.08 -87.7824) (layer F.CrtYd) (width 0.12)) 19 | (fp_line (start -5.08 -103.0224) (end 5.08 -103.0224) (layer F.CrtYd) (width 0.12)) 20 | (fp_circle (center 109.22 -97.79) (end 114.046 -97.79) (layer Cmts.User) (width 0.15)) 21 | (fp_circle (center -109.22 -97.79) (end -104.394 -97.79) (layer Cmts.User) (width 0.15)) 22 | (fp_circle (center 0 -97.9424) (end 4.826 -97.9424) (layer Cmts.User) (width 0.15)) 23 | (fp_circle (center -85.725 0.635) (end -81.975 0.635) (layer F.CrtYd) (width 0.05)) 24 | (fp_circle (center -85.725 0.635) (end -82.225 0.635) (layer Cmts.User) (width 0.15)) 25 | (fp_circle (center 85.725 0.635) (end 89.475 0.635) (layer F.CrtYd) (width 0.05)) 26 | (fp_circle (center 85.725 0.635) (end 89.225 0.635) (layer Cmts.User) (width 0.15)) 27 | (fp_circle (center 0 -92.8624) (end 4.826 -92.8624) (layer Cmts.User) (width 0.15)) 28 | (fp_circle (center -109.22 -92.71) (end -104.394 -92.71) (layer Cmts.User) (width 0.15)) 29 | (fp_circle (center 109.22 -92.71) (end 114.046 -92.71) (layer Cmts.User) (width 0.15)) 30 | (fp_text user %R (at 110.75162 -87.97036) (layer F.Fab) 31 | (effects (font (size 1 1) (thickness 0.15))) 32 | ) 33 | (fp_text user OSI (at 109.6772 -88.138) (layer F.SilkS) 34 | (effects (font (size 1 1) (thickness 0.15))) 35 | ) 36 | (fp_text user %R (at -109.31398 -87.86876) (layer F.Fab) 37 | (effects (font (size 1 1) (thickness 0.15))) 38 | ) 39 | (fp_text user OSI (at -109.4232 -88.138) (layer F.SilkS) 40 | (effects (font (size 1 1) (thickness 0.15))) 41 | ) 42 | (fp_text user %R (at 0.84582 -87.86876) (layer F.Fab) 43 | (effects (font (size 1 1) (thickness 0.15))) 44 | ) 45 | (fp_text user OSI (at 0.59182 -97.46996) (layer F.SilkS) 46 | (effects (font (size 1 1) (thickness 0.15))) 47 | ) 48 | (fp_text user OSI (at 86.06282 -3.94716) (layer F.SilkS) 49 | (effects (font (size 1 1) (thickness 0.15))) 50 | ) 51 | (fp_text user %R (at 86.31682 5.65404) (layer F.Fab) 52 | (effects (font (size 1 1) (thickness 0.15))) 53 | ) 54 | (fp_text user OSI (at -85.28558 -4.17576) (layer F.SilkS) 55 | (effects (font (size 1 1) (thickness 0.15))) 56 | ) 57 | (fp_text user %R (at -85.03158 5.42544) (layer F.Fab) 58 | (effects (font (size 1 1) (thickness 0.15))) 59 | ) 60 | (fp_text user OSI (at 0.1016 -87.7316) (layer F.SilkS) 61 | (effects (font (size 1 1) (thickness 0.15))) 62 | ) 63 | (fp_text user %R (at 0 -95.4024) (layer F.Fab) 64 | (effects (font (size 1 1) (thickness 0.15))) 65 | ) 66 | (pad "" np_thru_hole oval (at 109.22 -95.25) (size 7.112 12.192) (drill oval 7.112 12.192) (layers *.Cu *.Mask)) 67 | (pad "" np_thru_hole oval (at -109.22 -95.25) (size 7.112 12.192) (drill oval 7.112 12.192) (layers *.Cu *.Mask)) 68 | (pad "" np_thru_hole oval (at 0 -95.25) (size 7.112 12.192) (drill oval 7.112 12.192) (layers *.Cu *.Mask)) 69 | (pad "" np_thru_hole circle (at 85.725 0.635) (size 7.112 7.112) (drill 7.112) (layers *.Cu *.Mask)) 70 | (pad "" np_thru_hole circle (at -85.725 0.635) (size 7.112 7.112) (drill 7.112) (layers *.Cu *.Mask)) 71 | ) 72 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/SOL20-header-vertical.kicad_mod: -------------------------------------------------------------------------------- 1 | (module SOL20-header-vertical (layer F.Cu) (tedit 5E1E2018) 2 | (descr "Through hole straight pin header, 2x10, 2.54mm pitch, double rows") 3 | (tags "Through hole pin header THT 2x10 2.54mm double row") 4 | (fp_text reference REF** (at 1.27 -2.33) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value SOL-20 (at 1.27 25.19) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start 0 -1.27) (end 3.81 -1.27) (layer F.Fab) (width 0.1)) 11 | (fp_line (start 3.81 -1.27) (end 3.81 24.13) (layer F.Fab) (width 0.1)) 12 | (fp_line (start 3.81 24.13) (end -1.27 24.13) (layer F.Fab) (width 0.1)) 13 | (fp_line (start -1.27 24.13) (end -1.27 0) (layer F.Fab) (width 0.1)) 14 | (fp_line (start -1.27 0) (end 0 -1.27) (layer F.Fab) (width 0.1)) 15 | (fp_line (start -1.33 24.19) (end 3.87 24.19) (layer F.SilkS) (width 0.12)) 16 | (fp_line (start -1.33 1.27) (end -1.33 24.19) (layer F.SilkS) (width 0.12)) 17 | (fp_line (start 3.87 -1.33) (end 3.87 24.19) (layer F.SilkS) (width 0.12)) 18 | (fp_line (start -1.33 1.27) (end 1.27 1.27) (layer F.SilkS) (width 0.12)) 19 | (fp_line (start 1.27 1.27) (end 1.27 -1.33) (layer F.SilkS) (width 0.12)) 20 | (fp_line (start 1.27 -1.33) (end 3.87 -1.33) (layer F.SilkS) (width 0.12)) 21 | (fp_line (start -1.33 0) (end -1.33 -1.33) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start -1.33 -1.33) (end 0 -1.33) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start -1.8 -1.8) (end -1.8 24.65) (layer F.CrtYd) (width 0.05)) 24 | (fp_line (start -1.8 24.65) (end 4.35 24.65) (layer F.CrtYd) (width 0.05)) 25 | (fp_line (start 4.35 24.65) (end 4.35 -1.8) (layer F.CrtYd) (width 0.05)) 26 | (fp_line (start 4.35 -1.8) (end -1.8 -1.8) (layer F.CrtYd) (width 0.05)) 27 | (fp_text user %R (at 1.27 11.43 90) (layer F.Fab) 28 | (effects (font (size 1 1) (thickness 0.15))) 29 | ) 30 | (pad 1 thru_hole rect (at 0 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 31 | (pad 11 thru_hole oval (at 2.54 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 32 | (pad 2 thru_hole oval (at 0 2.54) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 33 | (pad 12 thru_hole oval (at 2.54 2.54) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 34 | (pad 3 thru_hole oval (at 0 5.08) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 35 | (pad 13 thru_hole oval (at 2.54 5.08) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 36 | (pad 4 thru_hole oval (at 0 7.62) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 37 | (pad 14 thru_hole oval (at 2.54 7.62) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 38 | (pad 5 thru_hole oval (at 0 10.16) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 39 | (pad 15 thru_hole oval (at 2.54 10.16) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 40 | (pad 6 thru_hole oval (at 0 12.7) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 41 | (pad 16 thru_hole oval (at 2.54 12.7) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 42 | (pad 7 thru_hole oval (at 0 15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 43 | (pad 17 thru_hole oval (at 2.54 15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 44 | (pad 8 thru_hole oval (at 0 17.78) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 45 | (pad 18 thru_hole oval (at 2.54 17.78) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 46 | (pad 9 thru_hole oval (at 0 20.32) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 47 | (pad 19 thru_hole oval (at 2.54 20.32) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 48 | (pad 10 thru_hole oval (at 0 22.86) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 49 | (pad 20 thru_hole oval (at 2.54 22.86) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)) 50 | (model ${KISYS3DMOD}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_2x10_P2.54mm_Vertical.wrl 51 | (at (xyz 0 0 0)) 52 | (scale (xyz 1 1 1)) 53 | (rotate (xyz 0 0 0)) 54 | ) 55 | ) 56 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/TIL311.kicad_mod: -------------------------------------------------------------------------------- 1 | (module TIL311 (layer F.Cu) (tedit 587952A2) 2 | (fp_text reference REF** (at -9.92 0 90) (layer F.SilkS) 3 | (effects (font (size 1.2 1.2) (thickness 0.15))) 4 | ) 5 | (fp_text value TIL311 (at 0 0) (layer F.Fab) 6 | (effects (font (size 1.2 1.2) (thickness 0.15))) 7 | ) 8 | (fp_line (start 8.763 -5.334) (end 8.763 -0.762) (layer F.SilkS) (width 0.15)) 9 | (fp_line (start 8.763 0.762) (end 8.763 5.334) (layer F.SilkS) (width 0.15)) 10 | (fp_arc (start 9.525 0) (end 8.763 0.762) (angle 90) (layer F.SilkS) (width 0.15)) 11 | (fp_line (start -8.763 3.175) (end -8.763 5.334) (layer F.SilkS) (width 0.15)) 12 | (fp_line (start -8.763 -1.905) (end -8.763 1.905) (layer F.SilkS) (width 0.15)) 13 | (fp_line (start -8.763 -5.334) (end -8.763 -3.175) (layer F.SilkS) (width 0.15)) 14 | (fp_arc (start -9.398 2.54) (end -8.763 1.905) (angle 90) (layer F.SilkS) (width 0.15)) 15 | (fp_arc (start -9.398 -2.54) (end -8.763 -3.175) (angle 90) (layer F.SilkS) (width 0.15)) 16 | (fp_line (start -8.72 5.309999) (end 8.72 5.31) (layer F.SilkS) (width 0.15)) 17 | (fp_line (start 8.72 -5.309999) (end -8.72 -5.31) (layer F.SilkS) (width 0.15)) 18 | (pad 14 thru_hole oval (at -7.62 -3.81) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)) 19 | (pad 1 thru_hole oval (at -7.62 3.81) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)) 20 | (pad 13 thru_hole oval (at -5.08 -3.81) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)) 21 | (pad 2 thru_hole oval (at -5.08 3.81) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)) 22 | (pad 12 thru_hole oval (at -2.54 -3.81) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)) 23 | (pad 3 thru_hole oval (at -2.54 3.81) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)) 24 | (pad 4 thru_hole oval (at 0 3.81) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)) 25 | (pad 10 thru_hole oval (at 2.54 -3.81) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)) 26 | (pad 5 thru_hole oval (at 2.54 3.81) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)) 27 | (pad 8 thru_hole oval (at 7.62 -3.81) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)) 28 | (pad 7 thru_hole oval (at 7.62 3.81) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)) 29 | ) 30 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/bend-guide-8u.kicad_mod: -------------------------------------------------------------------------------- 1 | (module bend-guide-8u (layer F.Cu) (tedit 5FFF769C) 2 | (descr "Guide for bending 8u spacebar stabilizer wire") 3 | (fp_text reference REF** (at -0.254 -3.818) (layer F.SilkS) hide 4 | (effects (font (size 1 1) (thickness 0.15))) 5 | ) 6 | (fp_text value bend-guide-8u (at -0.254 -4.818) (layer F.Fab) 7 | (effects (font (size 1 1) (thickness 0.15))) 8 | ) 9 | (fp_arc (start 0 0) (end 0 -0.8128) (angle 180) (layer Edge.Cuts) (width 0.1016)) 10 | (pad "" np_thru_hole circle (at 133.49224 0) (size 2.0828 2.0828) (drill 2.0828) (layers *.Cu *.Mask)) 11 | ) 12 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/futaba-post.kicad_mod: -------------------------------------------------------------------------------- 1 | (module futaba-post (layer F.Cu) (tedit 5F3AE48A) 2 | (fp_text reference REF** (at 0 0.5) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value futaba-post (at 0 -0.5) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start -2.032 2.0828) (end -2.0828 3.1496) (layer F.SilkS) (width 0.12)) 9 | (fp_line (start -2.0828 3.1496) (end 2.3876 3.2004) (layer F.SilkS) (width 0.12)) 10 | (fp_line (start 2.3876 3.2004) (end 2.7432 1.8288) (layer F.SilkS) (width 0.12)) 11 | (fp_line (start 2.7432 1.8288) (end -2.0828 2.032) (layer F.SilkS) (width 0.12)) 12 | 13 | 14 | (fp_arc (start 153.67036 195.79926) (end 153.67036 197.38676) (angle -180) (layer Edge.Cuts) (width 0.1016)) 15 | (fp_arc (start 163.34994 195.79926) (end 163.34994 194.21176) (angle -180) (layer Edge.Cuts) (width 0.1016)) 16 | (fp_line (start 153.67036 201.38676) (end 153.67036 197.38676) (layer F.SilkS) (width 0.08)) 17 | (fp_line (start 152.93848 198.88962) (end 153.64968 199.39254) (layer F.SilkS) (width 0.12)) 18 | (fp_line (start 153.64968 199.4027) (end 151.37384 199.4027) (layer F.SilkS) (width 0.12))) 19 | (fp_line (start 153.64714 199.41032) (end 152.91562 199.9615) (layer F.SilkS) (width 0.12)) 20 | (fp_line (start 143.64208 199.39508) (end 144.3736 198.8439) (layer F.SilkS) (width 0.12)) 21 | (fp_line (start 143.63954 199.4027) (end 145.91538 199.4027) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start 144.35074 199.91578) (end 143.63954 199.41286) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start 143.51036 201.19914) (end 171.51036 201.19914) (layer Edge.Cuts) (width 0.1016)) 24 | (fp_line (start 153.67036 194.21094) (end 141.92346 194.21094) (layer Edge.Cuts) (width 0.1016)) 25 | (fp_line (start 171.51254 197.38594) (end 163.34994 197.38594) (layer Edge.Cuts) (width 0.1016)) 26 | (fp_arc (start 173.09786 202.98664) (end 173.09786 204.57414) (angle -90) (layer Edge.Cuts) (width 0.1016)) 27 | (fp_arc (start 141.92332 202.98724) (end 140.33582 202.98724) (angle -90) (layer Edge.Cuts) (width 0.1016)) 28 | (fp_line (start 141.92332 204.57474) (end 173.09786 204.57414) (layer Edge.Cuts) (width 0.1016)) 29 | (fp_line (start 171.51036 197.38676) (end 171.51036 201.19914) (layer Edge.Cuts) (width 0.1016)) 30 | (fp_line (start 153.67036 197.38676) (end 143.51036 197.38676) (layer Edge.Cuts) (width 0.1016)) 31 | (fp_line (start 143.51036 201.19914) (end 143.51036 197.38676) (layer Edge.Cuts) (width 0.1016)) 32 | (fp_circle (center 169.51036 199.38676) (end 169.51036 200.48676) (layer Edge.Cuts) (width 0.08)) 33 | (fp_line (start 173.09786 194.21176) (end 163.34994 194.21176) (layer Edge.Cuts) (width 0.1016)) 34 | (fp_line (start 174.68536 195.79926) (end 174.68536 202.98664) (layer Edge.Cuts) (width 0.1016)) 35 | (fp_line (start 140.33536 202.98664) (end 140.33536 195.79926) (layer Edge.Cuts) (width 0.1016)) 36 | (fp_arc (start 173.09786 195.79926) (end 174.68536 195.79926) (angle -90) (layer Edge.Cuts) (width 0.1016)) 37 | (fp_arc (start 141.92286 195.79926) (end 141.92286 194.21176) (angle -90) (layer Edge.Cuts) (width 0.1016)) 38 | (fp_text "File to\n1.5mm" (at 148.86178 199.43064) (layer F.SilkS) 39 | (effects (font (size 1 1) (thickness 0.15)))) 40 | 41 | ) 42 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/kbd_mounting_holes_only.kicad_mod: -------------------------------------------------------------------------------- 1 | (module kbd_mounting_holes_only (layer F.Cu) (tedit 5EF57261) 2 | (descr "Through hole straight pin header, 2x20, 2.54mm pitch, double rows") 3 | (tags "Through hole pin header THT 2x20 2.54mm double row") 4 | (fp_text reference REF** (at 1.2954 -2.5078) (layer F.Fab) hide 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value "Interface mount" (at 1.27 50.59) (layer F.Fab) hide 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (pad "" np_thru_hole circle (at 91.4924 50.4712) (size 3.175 3.175) (drill 3.175) (layers *.Cu *.Mask)) 11 | (pad "" np_thru_hole circle (at 91.4924 -2.8688) (size 3.175 3.175) (drill 3.175) (layers *.Cu *.Mask)) 12 | (pad "" np_thru_hole circle (at 1.2954 -8.8124) (size 3.175 3.175) (drill 3.175) (layers *.Cu *.Mask)) 13 | (pad "" np_thru_hole circle (at 1.2954 54.5606) (size 3.175 3.175) (drill 3.175) (layers *.Cu *.Mask)) 14 | (model ${KISYS3DMOD}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_2x20_P2.54mm_Vertical.wrl 15 | (offset (xyz 2.54 0 -1.8288)) 16 | (scale (xyz 1 1 1)) 17 | (rotate (xyz 0 180 0)) 18 | ) 19 | ) 20 | -------------------------------------------------------------------------------- /hardware/common/unikbd.pretty/proto_pad.kicad_mod: -------------------------------------------------------------------------------- 1 | (module proto_pad (layer F.Cu) (tedit 602746C3) 2 | (descr "solder Pin_ with flat with fork, hole diameter 1.4mm, length 8.5mm, width 2.8mm, e.g. Ettinger 13.13.890, https://katalog.ettinger.de/#p=434") 3 | (tags "solder Pin_ with flat fork") 4 | (fp_text reference . (at 0.762 0.254) (layer F.SilkS) hide 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value . (at 0 -1.27) (layer F.Fab) hide 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start -1.4 0.25) (end -1.4 -0.25) (layer F.Fab) (width 0.1)) 11 | (fp_line (start 1.4 -0.25) (end 1.4 0.25) (layer F.Fab) (width 0.1)) 12 | (fp_line (start -1.4 -0.25) (end 1.4 -0.25) (layer F.Fab) (width 0.1)) 13 | (fp_line (start 1.4 0.25) (end -1.4 0.25) (layer F.Fab) (width 0.1)) 14 | (fp_text user . (at -0.762 0.254) (layer F.Fab) hide 15 | (effects (font (size 1 1) (thickness 0.15))) 16 | ) 17 | (pad 1 thru_hole circle (at 0 0) (size 2.032 2.032) (drill 1.016) (layers *.Cu *.Mask)) 18 | (model ${KISYS3DMOD}/Connector_Pin.3dshapes/Pin_D1.4mm_L8.5mm_W2.8mm_FlatFork.wrl 19 | (at (xyz 0 0 0)) 20 | (scale (xyz 1 1 1)) 21 | (rotate (xyz 0 0 0)) 22 | ) 23 | ) 24 | -------------------------------------------------------------------------------- /hardware/documents/Photo Jul 10, 12 20 41 PM.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/Photo Jul 10, 12 20 41 PM.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/All_TH_parts_installed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/All_TH_parts_installed.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/Connector_on_back.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/Connector_on_back.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/Install_Diodes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/Install_Diodes.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/Install_resistors.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/Install_resistors.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/Install_switches.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/Install_switches.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/Tape Diodes_in_place.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/Tape Diodes_in_place.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/Tape_parts_in_place.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/Tape_parts_in_place.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/Tape_to_table.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/Tape_to_table.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/bend_leads.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/bend_leads.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/cutting_post.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/cutting_post.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/filed_futaba_posts.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/filed_futaba_posts.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/futaba_aligner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/futaba_aligner.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/futaba_posts_before_and_after.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/futaba_posts_before_and_after.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/futaba_posts_before_filing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/futaba_posts_before_filing.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/futaba_posts_breakaway_filed_off.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/futaba_posts_breakaway_filed_off.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/futaba_posts_installed_on_spacebar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/futaba_posts_installed_on_spacebar.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/futaba_posts_press_into_spacebar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/futaba_posts_press_into_spacebar.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/installing_futaba_spacebar_stabilizer_rod.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/installing_futaba_spacebar_stabilizer_rod.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/pcb_mount_stabilizers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/pcb_mount_stabilizers.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/posts_removed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/posts_removed.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/pre-breakaway.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/pre-breakaway.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/rod_estimating_second_bend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/rod_estimating_second_bend.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/rod_first_bend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/rod_first_bend.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/rod_insert_first_arm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/rod_insert_first_arm.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/solder_switches.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/solder_switches.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/stabilizer_installed_futaba.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/stabilizer_installed_futaba.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/stabilizer_rod_stock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/stabilizer_rod_stock.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/stabilizer_rod_timmed_arms.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/stabilizer_rod_timmed_arms.jpg -------------------------------------------------------------------------------- /hardware/documents/build-images/test_fit_too_long.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/build-images/test_fit_too_long.jpg -------------------------------------------------------------------------------- /hardware/documents/solder_switches.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/documents/solder_switches.jpg -------------------------------------------------------------------------------- /hardware/franklin-ace-1000-keyboard/README.md: -------------------------------------------------------------------------------- 1 | # Franklin-ACE-1000-Keyboard 2 | Replacement Franklin ACE 1000 keyboard for use with osiweb's Unified Retro Keyboard 3 | 4 | ## Images 5 | ![Image 1](images/2023-03-18%2010.09.14.jpg?raw=true "Image 1") 6 | ![Image 4](images/2023-03-18%2010.15.01.jpg?raw=true "Image 4") 7 | ![Image 2](images/2023-03-18%2010.15.10.jpg?raw=true "Image 2") 8 | ![Image 5](images/2023-03-18%2010.16.16.jpg?raw=true "Image 5") 9 | ![Image 3](images/2023-03-18%2010.19.41.jpg?raw=true "Image 3") 10 | -------------------------------------------------------------------------------- /hardware/franklin-ace-1000-keyboard/images/2023-03-18 10.09.14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/franklin-ace-1000-keyboard/images/2023-03-18 10.09.14.jpg -------------------------------------------------------------------------------- /hardware/franklin-ace-1000-keyboard/images/2023-03-18 10.15.01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/franklin-ace-1000-keyboard/images/2023-03-18 10.15.01.jpg -------------------------------------------------------------------------------- /hardware/franklin-ace-1000-keyboard/images/2023-03-18 10.15.10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/franklin-ace-1000-keyboard/images/2023-03-18 10.15.10.jpg -------------------------------------------------------------------------------- /hardware/franklin-ace-1000-keyboard/images/2023-03-18 10.16.16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/franklin-ace-1000-keyboard/images/2023-03-18 10.16.16.jpg -------------------------------------------------------------------------------- /hardware/franklin-ace-1000-keyboard/images/2023-03-18 10.19.41.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/franklin-ace-1000-keyboard/images/2023-03-18 10.19.41.jpg -------------------------------------------------------------------------------- /hardware/interface-ascii-atmega2560/images/PCB-assembly-rendering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/interface-ascii-atmega2560/images/PCB-assembly-rendering.png -------------------------------------------------------------------------------- /hardware/interface-ascii/images/PCB-assembly-rendering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/interface-ascii/images/PCB-assembly-rendering.png -------------------------------------------------------------------------------- /hardware/interface-ascii/interface-ascii-bom.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/interface-ascii/interface-ascii-bom.xlsx -------------------------------------------------------------------------------- /hardware/interface-ascii/production-package/interface-ascii-Rev_3.0.0-Production-package.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/interface-ascii/production-package/interface-ascii-Rev_3.0.0-Production-package.zip -------------------------------------------------------------------------------- /hardware/interface-ascii/production-package/programming_files_dir/README.rst: -------------------------------------------------------------------------------- 1 | Firmware Downloads 2 | ================== 3 | 4 | Download the latest release of the firmware [here](https://osiweb.github.io/unified_retro_keyboard) 5 | -------------------------------------------------------------------------------- /hardware/interface-osi/README.md: -------------------------------------------------------------------------------- 1 | * OSI Compatible interface 2 | 3 | An interface for OSI computers that is compatible with the OSI 542C keyboard, including sound circuits. 4 | 5 | This interface also permits substitution of a soft-shiftlock function using 6 | a regular momentary keyswitch, instead of the hard-to-find latching keyswitch. 7 | An LED is provided to indicate SHIFT LOCK status. This interface mates with 8 | the Classic ASCII keyboard, configured with the OSI keycaps. 9 | 10 | Assembly Rendering 11 | 12 | **Construction Notes: 13 | 14 | 1. If a diode per key is installed on the keyboard, then omit diodes D1-D8 and install D18. 15 | 16 | 1. If the keyboard is not installed with a diode per key, then install D1-D8, and omit D18. 17 | 18 | 1. The RESET delay is about 3 seconds with a 6.8 uF capacitor at C20. 4.7 uF gives about 19 | 2 seconds, and 3.3 uF gives about a 1 second delay. 20 | 21 | 1. If you want to use the sound circuit with an older 540A video board, then on the 540A board, jumper pin 13 22 | of IC E4 to pin 15 of the keyboard connector, and on the OSI interface board, set JP1 to "S1". 23 | 24 | 1. If you use a 540B video board, then set JP1 to "/S1" 25 | 26 | -------------------------------------------------------------------------------- /hardware/interface-osi/addon.kicad-pcb.pro: -------------------------------------------------------------------------------- 1 | update=22/05/2015 07:44:53 2 | version=1 3 | last_client=kicad 4 | [general] 5 | version=1 6 | RootSch= 7 | BoardNm= 8 | [pcbnew] 9 | version=1 10 | LastNetListRead= 11 | UseCmpFile=1 12 | PadDrill=0.600000000000 13 | PadDrillOvalY=0.600000000000 14 | PadSizeH=1.500000000000 15 | PadSizeV=1.500000000000 16 | PcbTextSizeV=1.500000000000 17 | PcbTextSizeH=1.500000000000 18 | PcbTextThickness=0.300000000000 19 | ModuleTextSizeV=1.000000000000 20 | ModuleTextSizeH=1.000000000000 21 | ModuleTextSizeThickness=0.150000000000 22 | SolderMaskClearance=0.000000000000 23 | SolderMaskMinWidth=0.000000000000 24 | DrawSegmentWidth=0.200000000000 25 | BoardOutlineThickness=0.100000000000 26 | ModuleOutlineThickness=0.150000000000 27 | [cvpcb] 28 | version=1 29 | NetIExt=net 30 | [eeschema] 31 | version=1 32 | LibDir= 33 | [eeschema/libraries] 34 | -------------------------------------------------------------------------------- /hardware/interface-osi/addon.pro: -------------------------------------------------------------------------------- 1 | update=Thursday, May 14, 2020 at 04:14:31 PM 2 | version=1 3 | last_client=kicad 4 | [general] 5 | version=1 6 | RootSch= 7 | BoardNm= 8 | [pcbnew] 9 | version=1 10 | LastNetListRead= 11 | UseCmpFile=1 12 | PadDrill=0.600000000000 13 | PadDrillOvalY=0.600000000000 14 | PadSizeH=1.500000000000 15 | PadSizeV=1.500000000000 16 | PcbTextSizeV=1.500000000000 17 | PcbTextSizeH=1.500000000000 18 | PcbTextThickness=0.300000000000 19 | ModuleTextSizeV=1.000000000000 20 | ModuleTextSizeH=1.000000000000 21 | ModuleTextSizeThickness=0.150000000000 22 | SolderMaskClearance=0.000000000000 23 | SolderMaskMinWidth=0.000000000000 24 | DrawSegmentWidth=0.200000000000 25 | BoardOutlineThickness=0.100000000000 26 | ModuleOutlineThickness=0.150000000000 27 | [cvpcb] 28 | version=1 29 | NetIExt=net 30 | [eeschema] 31 | version=1 32 | LibDir= 33 | [eeschema/libraries] 34 | [schematic_editor] 35 | version=1 36 | PageLayoutDescrFile= 37 | PlotDirectoryName= 38 | SubpartIdSeparator=0 39 | SubpartFirstId=65 40 | NetFmtName= 41 | SpiceAjustPassiveValues=0 42 | LabSize=50 43 | ERC_TestSimilarLabels=1 44 | -------------------------------------------------------------------------------- /hardware/interface-osi/images/pcb-render.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/interface-osi/images/pcb-render.png -------------------------------------------------------------------------------- /hardware/keyboard-classic/Aligner-cherry/aligner-cherry.pro: -------------------------------------------------------------------------------- 1 | update=05/04/2019 20:44:53 2 | version=1 3 | last_client=kicad 4 | [general] 5 | version=1 6 | RootSch= 7 | BoardNm= 8 | [pcbnew] 9 | version=1 10 | LastNetListRead= 11 | UseCmpFile=1 12 | PadDrill=0.600000000000 13 | PadDrillOvalY=0.600000000000 14 | PadSizeH=1.500000000000 15 | PadSizeV=1.500000000000 16 | PcbTextSizeV=1.500000000000 17 | PcbTextSizeH=1.500000000000 18 | PcbTextThickness=0.300000000000 19 | ModuleTextSizeV=1.000000000000 20 | ModuleTextSizeH=1.000000000000 21 | ModuleTextSizeThickness=0.150000000000 22 | SolderMaskClearance=0.000000000000 23 | SolderMaskMinWidth=0.000000000000 24 | DrawSegmentWidth=0.200000000000 25 | BoardOutlineThickness=0.100000000000 26 | ModuleOutlineThickness=0.150000000000 27 | CopperEdgeClearance=0.000000000000 28 | [cvpcb] 29 | version=1 30 | NetIExt=net 31 | [eeschema] 32 | version=1 33 | LibDir= 34 | [eeschema/libraries] 35 | -------------------------------------------------------------------------------- /hardware/keyboard-classic/Aligner-futaba/aligner-futaba.pro: -------------------------------------------------------------------------------- 1 | update=05/04/2019 20:44:53 2 | version=1 3 | last_client=kicad 4 | [general] 5 | version=1 6 | RootSch= 7 | BoardNm= 8 | [pcbnew] 9 | version=1 10 | LastNetListRead= 11 | UseCmpFile=1 12 | PadDrill=0.600000000000 13 | PadDrillOvalY=0.600000000000 14 | PadSizeH=1.500000000000 15 | PadSizeV=1.500000000000 16 | PcbTextSizeV=1.500000000000 17 | PcbTextSizeH=1.500000000000 18 | PcbTextThickness=0.300000000000 19 | ModuleTextSizeV=1.000000000000 20 | ModuleTextSizeH=1.000000000000 21 | ModuleTextSizeThickness=0.150000000000 22 | SolderMaskClearance=0.000000000000 23 | SolderMaskMinWidth=0.000000000000 24 | DrawSegmentWidth=0.200000000000 25 | BoardOutlineThickness=0.100000000000 26 | ModuleOutlineThickness=0.150000000000 27 | CopperEdgeClearance=0.000000000000 28 | [cvpcb] 29 | version=1 30 | NetIExt=net 31 | [eeschema] 32 | version=1 33 | LibDir= 34 | [eeschema/libraries] 35 | -------------------------------------------------------------------------------- /hardware/keyboard-classic/classic-ascii-keycaps.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/keyboard-classic/classic-ascii-keycaps.xlsx -------------------------------------------------------------------------------- /hardware/keyboard-classic/kbd-classic.pro: -------------------------------------------------------------------------------- 1 | update=22/05/2015 07:44:53 2 | version=1 3 | last_client=kicad 4 | [general] 5 | version=1 6 | RootSch= 7 | BoardNm= 8 | [pcbnew] 9 | version=1 10 | LastNetListRead= 11 | UseCmpFile=1 12 | PadDrill=0.600000000000 13 | PadDrillOvalY=0.600000000000 14 | PadSizeH=1.500000000000 15 | PadSizeV=1.500000000000 16 | PcbTextSizeV=1.500000000000 17 | PcbTextSizeH=1.500000000000 18 | PcbTextThickness=0.300000000000 19 | ModuleTextSizeV=1.000000000000 20 | ModuleTextSizeH=1.000000000000 21 | ModuleTextSizeThickness=0.150000000000 22 | SolderMaskClearance=0.000000000000 23 | SolderMaskMinWidth=0.000000000000 24 | DrawSegmentWidth=0.200000000000 25 | BoardOutlineThickness=0.100000000000 26 | ModuleOutlineThickness=0.150000000000 27 | [cvpcb] 28 | version=1 29 | NetIExt=net 30 | [eeschema] 31 | version=1 32 | LibDir= 33 | [eeschema/libraries] 34 | -------------------------------------------------------------------------------- /hardware/keyboard-franklin-ace-1000/readme.md: -------------------------------------------------------------------------------- 1 | # Franklin-ACE-1000-Keyboard 2 | Replacement Franklin ACE 1000 keyboard for use with osiweb's Unified Retro Keyboard 3 | 4 | ## Images 5 | ![Image 1](images/2023-03-18%2010.09.14.jpg?raw=true "Image 1") 6 | ![Image 4](images/2023-03-18%2010.15.01.jpg?raw=true "Image 4") 7 | ![Image 2](images/2023-03-18%2010.15.10.jpg?raw=true "Image 2") 8 | ![Image 5](images/2023-03-18%2010.16.16.jpg?raw=true "Image 5") 9 | ![Image 3](images/2023-03-18%2010.19.41.jpg?raw=true "Image 3") 10 | -------------------------------------------------------------------------------- /hardware/keyboard-knight/README.md: -------------------------------------------------------------------------------- 1 | # Knight keyboard 2 | 3 | This keyboard replicates the keyboards on the MIT AI PDP-10. 4 | 5 | ## Differences from the original include: 6 | 7 | 1. The original keyboard used Hall effect switches. This keyboard uses 8 | standard switches (either Cherry or Futaba). 9 | -------------------------------------------------------------------------------- /hardware/keyboard-knight/knight-keycaps.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/keyboard-knight/knight-keycaps.xlsx -------------------------------------------------------------------------------- /hardware/keyboard-knight/sail-keycaps.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/keyboard-knight/sail-keycaps.xlsx -------------------------------------------------------------------------------- /hardware/keyboard-sol-integrated/README.md: -------------------------------------------------------------------------------- 1 | # SOL keyboard with built-in encoder 2 | 3 | This keyboard with integrated encoder replicates the keyboard on the SOL-20. 4 | 5 | This keyboard has a sibling Sol-20 keyboard without integrated 6 | encoder [(here)](../keyboard-sol). The two keyboards are identical except for the following differences: 7 | 8 | 1. This integrated version places the connector closer to the main board keyboard 9 | socket, so the original cable fits more easily. 10 | 11 | 1. The non-integrated version requires a piggy-back encoder board. When 12 | installing in a Sol-20, this piggyback board must be mounted on the right 13 | side of the keyboard, and connected with a cable, to avoid mechanical 14 | interference from the Sol main board. 15 | 16 | 1. The piggy-back encoder is more flexible for use with other machines, via the Apple-1 and 17 | Apple-2 sockets, and two different user-configurable headers. 18 | 19 | 1. The piggy-back encoder also includes a UART interface. 20 | 21 | The keyboard is designed using KiCad in order to be the most useful for anybody 22 | wishing to modify the keyboard for more specific uses, or to add to the project. 23 | 24 | The keyset for the SOL-20 keyboard consists of the Unified Keyboard Project 25 | classic ASCII keyset, with a special SOL-20 add-on keyset. 26 | 27 | ## Differences from the original include: 28 | 29 | 1. The original keyboard is a capacitive keyboard. This keyboard uses standard 30 | switches (either Cherry or Futaba). 31 | 32 | 1. The original keycaps have an 11 degree angled stem. It may be possible to 33 | find such keycaps, but I was unable to find any. It also may be possible to 34 | create 11 degree adapters. But this keyboard uses straight keycaps. I have 35 | tried both styles, and do not find a difference in typing comfort or speed, 36 | althought there is an aesthetic difference. There is s tiny bit of space 37 | between keys using straight keycaps, so an 11 degree adapter may not require 38 | any change to the layout. 39 | 40 | 41 | 1. The original uses UPPERCASE+REPEAT to reset the system. For technical 42 | reasons, this version uses CTRL+MODE_SELECT to RESET the system. 43 | 44 | Sol 20 Keyboard 45 | Sol 20 Keyboard 46 | Sol 20 Keyboard 47 | -------------------------------------------------------------------------------- /hardware/keyboard-sol-integrated/images/kbd_fit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/keyboard-sol-integrated/images/kbd_fit.jpg -------------------------------------------------------------------------------- /hardware/keyboard-sol-integrated/images/sol-integrated-pcb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/keyboard-sol-integrated/images/sol-integrated-pcb.png -------------------------------------------------------------------------------- /hardware/keyboard-sol-integrated/images/sol_20_kbd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/keyboard-sol-integrated/images/sol_20_kbd.jpg -------------------------------------------------------------------------------- /hardware/keyboard-sol-integrated/kbd-sol-2_0-bom.csv: -------------------------------------------------------------------------------- 1 | Comment,Designator,Footprint,LCSC 2 | 36pf,"C1,C2",Capacitor_SMD:C_0603_1608Metric,C134070 3 | 0.1 uF,"C3,C4,C5,C6,C7",Capacitor_SMD:C_0603_1608Metric,C14663 4 | 1N4148,"D1,D2,D3,D4,D5,D6,D7,D8,D9,D10,D11,D12,D13,D14,D15,D16,D17,D18,D19,D20,D21,D22,D23,D24,D25,D26,D27,D28,D29,D30,D31,D32,D33,D34,D35,D36,D37,D38,D39,D40,D41,D42,D43,D44,D45,D46,D47,D48,D49,D50,D51,D52,D53,D54,D55,D56,D57,D58,D59,D60,D61,D62,D63,D64,D65,D66,D67,D68,D69,D70,D71,D72,D73,D74,D75,D76,D77,D78,D79,D80,D81,D82,D83,D84,D85, D86,D87,D88,D89,D90,D91,D92,D93",unikbd:diode-combined,C118751 5 | 330,"R4,R5,R6",Resistor_SMD:R_0805_2012Metric, 6 | 10k,R7,Resistor_SMD:R_0603_1608Metric,C98220 7 | ATmega2560-16AU,U1,Package_QFP:TQFP-100_14x14mm_P0.5mm,C22460 8 | 16.000 MHz,Y1,Crystal:Crystal_SMD_HC49-SD,C326544 -------------------------------------------------------------------------------- /hardware/keyboard-sol-integrated/kbd-sol.pro: -------------------------------------------------------------------------------- 1 | update=Tuesday, May 05, 2020 at 04:02:42 PM 2 | version=1 3 | last_client=kicad 4 | [general] 5 | version=1 6 | RootSch= 7 | BoardNm= 8 | [pcbnew] 9 | version=1 10 | LastNetListRead= 11 | UseCmpFile=1 12 | PadDrill=0.600000000000 13 | PadDrillOvalY=0.600000000000 14 | PadSizeH=1.500000000000 15 | PadSizeV=1.500000000000 16 | PcbTextSizeV=1.500000000000 17 | PcbTextSizeH=1.500000000000 18 | PcbTextThickness=0.300000000000 19 | ModuleTextSizeV=1.000000000000 20 | ModuleTextSizeH=1.000000000000 21 | ModuleTextSizeThickness=0.150000000000 22 | SolderMaskClearance=0.000000000000 23 | SolderMaskMinWidth=0.000000000000 24 | DrawSegmentWidth=0.200000000000 25 | BoardOutlineThickness=0.100000000000 26 | ModuleOutlineThickness=0.150000000000 27 | [cvpcb] 28 | version=1 29 | NetIExt=net 30 | [eeschema] 31 | version=1 32 | LibDir= 33 | [eeschema/libraries] 34 | [schematic_editor] 35 | version=1 36 | PageLayoutDescrFile= 37 | PlotDirectoryName= 38 | SubpartIdSeparator=0 39 | SubpartFirstId=65 40 | NetFmtName= 41 | SpiceAjustPassiveValues=0 42 | LabSize=50 43 | ERC_TestSimilarLabels=1 44 | -------------------------------------------------------------------------------- /hardware/keyboard-sol/README.md: -------------------------------------------------------------------------------- 1 | # SOL keyboard 2 | 3 | This keyboard replicates the keyboard on the SOL-20. 4 | 5 | This keyboad matrix works with one of the add-on ASCII encoders from this 6 | project, which must be separately built or acquired. 7 | 8 | This keyboard has a sibling Sol-20 keyboard with integrated 9 | encoder [(here)](../keyboard-sol-integrated). The two keyboards are identical except for the following differences: 10 | 11 | 1. The integrated version places the connector closer to the main board keyboard 12 | socket, so the original cable fits more easily. 13 | 14 | 1. This non-integrated version requires a piggy-back encoder board. When 15 | installing in a Sol-20, this piggyback board must be mounted on the right 16 | side of the keyboard, and connected with a cable, to avoid mechanical 17 | interference from the Sol main board. 18 | 19 | 1. The piggy-back encoder is more flexible for use with other machines, via the 20 | Apple-1 and Apple-2 sockets, and two different user-configurable headers. 21 | 22 | 1. The piggy-back encoder also includes a UART interface. 23 | 24 | The keyboard is designed using KiCad in order to be the most useful for anybody 25 | wishing to modify the keyboard for more specific uses, or to add to the project. 26 | 27 | The keyset for the SOL-20 keyboard consists of the Unified Keyboard Project 28 | classic ASCII keyset, with a special SOL-20 add-on keyset. 29 | 30 | ## Differences from the original include: 31 | 32 | 1. The original keyboard is a capacitive keyboard. This keyboard uses standard 33 | switches (either Cherry or Futaba). 34 | 35 | 1. The original keycaps have an 11 degree angled stem. It may be possible to 36 | find such keycaps, but I was unable to find any. It also may be possible to 37 | create 11 degree adapters. But this keyboard uses straight keycaps. I have 38 | tried both styles, and do not find a difference in typing comfort or speed, 39 | althought there is an aesthetic difference. There is s tiny bit of space 40 | between keys using straight keycaps, so an 11 degree adapter may not require 41 | any change to the layout. 42 | 43 | 44 | 1. The original uses UPPERCASE+REPEAT to reset the system. For technical 45 | reasons, this version uses CTRL+MODE_SELECT to RESET the system. 46 | 47 | Sol 20 Keyboard 48 | Sol 20 Keyboard 49 | -------------------------------------------------------------------------------- /hardware/keyboard-sol/aligner-cherry/aligner-cherry.pro: -------------------------------------------------------------------------------- 1 | update=22/05/2015 07:44:53 2 | version=1 3 | last_client=kicad 4 | [general] 5 | version=1 6 | RootSch= 7 | BoardNm= 8 | [pcbnew] 9 | version=1 10 | LastNetListRead= 11 | UseCmpFile=1 12 | PadDrill=0.600000000000 13 | PadDrillOvalY=0.600000000000 14 | PadSizeH=1.500000000000 15 | PadSizeV=1.500000000000 16 | PcbTextSizeV=1.500000000000 17 | PcbTextSizeH=1.500000000000 18 | PcbTextThickness=0.300000000000 19 | ModuleTextSizeV=1.000000000000 20 | ModuleTextSizeH=1.000000000000 21 | ModuleTextSizeThickness=0.150000000000 22 | SolderMaskClearance=0.000000000000 23 | SolderMaskMinWidth=0.000000000000 24 | DrawSegmentWidth=0.200000000000 25 | BoardOutlineThickness=0.100000000000 26 | ModuleOutlineThickness=0.150000000000 27 | [cvpcb] 28 | version=1 29 | NetIExt=net 30 | [eeschema] 31 | version=1 32 | LibDir= 33 | [eeschema/libraries] 34 | -------------------------------------------------------------------------------- /hardware/keyboard-sol/aligner-cherry/fp-lib-table: -------------------------------------------------------------------------------- 1 | (fp_lib_table 2 | (lib (name unikbd)(type KiCad)(uri /Users/dave/vsrc/unified_retro_keyboard/hardware/common/unikbd.pretty)(options "")(descr "")) 3 | ) 4 | -------------------------------------------------------------------------------- /hardware/keyboard-sol/aligner-futaba/aligner-futaba.pro: -------------------------------------------------------------------------------- 1 | update=22/05/2015 07:44:53 2 | version=1 3 | last_client=kicad 4 | [general] 5 | version=1 6 | RootSch= 7 | BoardNm= 8 | [pcbnew] 9 | version=1 10 | LastNetListRead= 11 | UseCmpFile=1 12 | PadDrill=0.600000000000 13 | PadDrillOvalY=0.600000000000 14 | PadSizeH=1.500000000000 15 | PadSizeV=1.500000000000 16 | PcbTextSizeV=1.500000000000 17 | PcbTextSizeH=1.500000000000 18 | PcbTextThickness=0.300000000000 19 | ModuleTextSizeV=1.000000000000 20 | ModuleTextSizeH=1.000000000000 21 | ModuleTextSizeThickness=0.150000000000 22 | SolderMaskClearance=0.000000000000 23 | SolderMaskMinWidth=0.000000000000 24 | DrawSegmentWidth=0.200000000000 25 | BoardOutlineThickness=0.100000000000 26 | ModuleOutlineThickness=0.150000000000 27 | [cvpcb] 28 | version=1 29 | NetIExt=net 30 | [eeschema] 31 | version=1 32 | LibDir= 33 | [eeschema/libraries] 34 | -------------------------------------------------------------------------------- /hardware/keyboard-sol/images/kbd_fit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/keyboard-sol/images/kbd_fit.jpg -------------------------------------------------------------------------------- /hardware/keyboard-sol/images/sol_20_kbd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/keyboard-sol/images/sol_20_kbd.jpg -------------------------------------------------------------------------------- /hardware/keyboard-sol/kbd-sol.pro: -------------------------------------------------------------------------------- 1 | update=Tuesday, May 05, 2020 at 04:02:42 PM 2 | version=1 3 | last_client=kicad 4 | [general] 5 | version=1 6 | RootSch= 7 | BoardNm= 8 | [pcbnew] 9 | version=1 10 | LastNetListRead= 11 | UseCmpFile=1 12 | PadDrill=0.600000000000 13 | PadDrillOvalY=0.600000000000 14 | PadSizeH=1.500000000000 15 | PadSizeV=1.500000000000 16 | PcbTextSizeV=1.500000000000 17 | PcbTextSizeH=1.500000000000 18 | PcbTextThickness=0.300000000000 19 | ModuleTextSizeV=1.000000000000 20 | ModuleTextSizeH=1.000000000000 21 | ModuleTextSizeThickness=0.150000000000 22 | SolderMaskClearance=0.000000000000 23 | SolderMaskMinWidth=0.000000000000 24 | DrawSegmentWidth=0.200000000000 25 | BoardOutlineThickness=0.100000000000 26 | ModuleOutlineThickness=0.150000000000 27 | [cvpcb] 28 | version=1 29 | NetIExt=net 30 | [eeschema] 31 | version=1 32 | LibDir= 33 | [eeschema/libraries] 34 | [schematic_editor] 35 | version=1 36 | PageLayoutDescrFile= 37 | PlotDirectoryName= 38 | SubpartIdSeparator=0 39 | SubpartFirstId=65 40 | NetFmtName= 41 | SpiceAjustPassiveValues=0 42 | LabSize=50 43 | ERC_TestSimilarLabels=1 44 | -------------------------------------------------------------------------------- /hardware/keyboard-sol/sol-20-keycaps.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/keyboard-sol/sol-20-keycaps.xlsx -------------------------------------------------------------------------------- /hardware/multi-kbd-adapter/README.md: -------------------------------------------------------------------------------- 1 | # Unified Keyboard Project Multi Adapter 2 | 3 | This is a keyboard adapter to permit use of Apple 1, Apple 2, and Sol-20 4 | compatible keyboards with any of these three computers. 5 | 6 | ## Notes 7 | - Protoboard-style pad matrix permits flexible choice of on-board RESET and CLEAR (OR 8 | LOCAL) switches. 9 | - Pin header allows external RESET and CLEAR (or LOCAL) switches 10 | - Note that the SOL and Apple keyboards have different strobe polarity. Make 11 | sure the strobe polarity on the keyboard is properly configured. 12 | 13 | 14 | Assembly Rendering 16 | -------------------------------------------------------------------------------- /hardware/multi-kbd-adapter/images/multi-adapter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osiweb/unified_retro_keyboard/cb61d89fbdd02b0af355ebbb5fe8b856e0439442/hardware/multi-kbd-adapter/images/multi-adapter.png --------------------------------------------------------------------------------