From 6c5fbd76bf16bdf10cc1b5b76365354add94cdc2 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 5 Feb 2025 10:45:42 +0000 Subject: [PATCH] trs80: put the AZERTY configuration into the config.h file instead --- Kernel/platform/platform-trs80/config.h | 4 ++++ Kernel/platform/platform-trs80/devtty.c | 8 +++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Kernel/platform/platform-trs80/config.h b/Kernel/platform/platform-trs80/config.h index 2ec8c78330..478ef0c457 100644 --- a/Kernel/platform/platform-trs80/config.h +++ b/Kernel/platform/platform-trs80/config.h @@ -2,6 +2,10 @@ #define CONFIG_RTC #define CONFIG_RTC_FULL #define CONFIG_RTC_INTERVAL 10 /* fast RTC */ + +/* Set this for AZERTY keyboard handling */ +#undef CONFIG_AZERTY + /* Enable to make ^Z dump the inode table for debug */ #undef CONFIG_IDUMP /* Enable to make ^A drop back into the monitor */ diff --git a/Kernel/platform/platform-trs80/devtty.c b/Kernel/platform/platform-trs80/devtty.c index 6b3b03f413..110c5ad760 100644 --- a/Kernel/platform/platform-trs80/devtty.c +++ b/Kernel/platform/platform-trs80/devtty.c @@ -9,8 +9,6 @@ #include #include -//#define AZERTY // uncomment this for AZERTY keyboards - static char tbuf1[TTYSIZ]; static char tbuf2[TTYSIZ]; static char tbuf3[TTYSIZ]; @@ -248,7 +246,7 @@ static void keyproc(void) } uint8_t keyboard[8][8] = { -#ifdef AZERTY +#ifdef CONFIG_AZERTY {'>', 'q', 'b', 'c', 'd', 'e', 'f', 'g' }, {'h', 'i', 'j', 'k', 'l', ',', 'n', 'o' }, {'p', 'a', 'r', 's', 't', 'u', 'v', 'z' }, @@ -270,7 +268,7 @@ uint8_t keyboard[8][8] = { }; uint8_t shiftkeyboard[8][8] = { -#ifdef AZERTY +#ifdef CONFIG_AZERTY {'<', 'Q', 'B', 'C', 'D', 'E', 'F', 'G' }, {'H', 'I', 'J', 'K', 'L', '?', 'N', 'O' }, {'P', 'A', 'R', 'S', 'T', 'U', 'V', 'Z' }, @@ -322,7 +320,7 @@ static void keydecode(void) with control */ if (keymap[7] & 4) { /* control */ m |= KEYPRESS_CTRL; -#ifdef AZERTY +#ifdef CONFIG_AZERTY if (!(keymap[7] & 3)) { /* no shift */ if (c == '&') c = '|';