Add user-bindable function to print ascii chars

This commit is contained in:
Dave 2022-12-30 17:36:15 -06:00
parent 14f7f1ed3e
commit 573d6f842b
4 changed files with 10 additions and 1 deletions

View File

@ -74,6 +74,7 @@ list (APPEND SOURCES
Keymaps/asdf_keymap_apple2_caps.c
Keymaps/asdf_keymap_apple2_add_map.c
Keymaps/asdf_keymap_sol.c
Keymaps/asdf_keymap_utils.c
main.c
)

View File

@ -25,11 +25,13 @@
#include "asdf_print.h"
#include "asdf_hook.h"
#include "asdf_keymaps.h"
#include "asdf_virtual.h"
#include "asdf_modifiers.h"
#include "asdf_keymap_apple2_add_map.h"
#include "asdf_keymap_apple2.h"
#include "asdf_keymap_utils.h"
// PROCEDURE:
// INPUTS:
@ -62,6 +64,7 @@ void setup_apple2_keymap(void)
asdf_hook_assign(APPLESOFT_KEYBOARD_TEST, applesoft_keyboard_test);
asdf_hook_assign(APPLE2_ID_MESSAGE, apple2_id_message);
asdf_hook_assign(APPLE2_ASCII_TEST, asdf_keymap_print_characters);
// Attach the physical POWER LED as the CAPS LED. Assign no triggered
// function, and initialize to initial state of the CAPS logic. The CAPS LED

View File

@ -39,8 +39,11 @@
#if !defined(ASDF_KEYMAP_DEFS_APPLE2_H)
#define ASDF_KEYMAP_DEFS_APPLE2_H
#include "asdf_hook.h"
#define APPLESOFT_KEYBOARD_TEST ASDF_HOOK_USER_3
#define APPLE2_ID_MESSAGE ASDF_HOOK_USER_4
#define APPLE2_ASCII_TEST ASDF_HOOK_USER_5
#define APPLE2_PRINT_DELAY 40 // msec

View File

@ -82,7 +82,9 @@ typedef enum {
ASCII_RT_CURLY_BRACE = 0x7d,
ASCII_TILDE = 0x7e,
ASCII_VERT_BAR = 0x7c,
ASCII_DEL = 0x7f
ASCII_DEL = 0x7f,
ASCII_MAX_PRINTABLE = 0x7f,
ASCII_MIN_PRINTABLE = 0x20,
} ascii_defs_t;
#define ASCII_NULL 0