Skip to content

Commit 6c5fbd7

Browse files
committed
trs80: put the AZERTY configuration into the config.h file instead
1 parent b79b126 commit 6c5fbd7

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Kernel/platform/platform-trs80/config.h

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#define CONFIG_RTC
33
#define CONFIG_RTC_FULL
44
#define CONFIG_RTC_INTERVAL 10 /* fast RTC */
5+
6+
/* Set this for AZERTY keyboard handling */
7+
#undef CONFIG_AZERTY
8+
59
/* Enable to make ^Z dump the inode table for debug */
610
#undef CONFIG_IDUMP
711
/* Enable to make ^A drop back into the monitor */

Kernel/platform/platform-trs80/devtty.c

+3-5
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
#include <devinput.h>
1010
#include <stdarg.h>
1111

12-
//#define AZERTY // uncomment this for AZERTY keyboards
13-
1412
static char tbuf1[TTYSIZ];
1513
static char tbuf2[TTYSIZ];
1614
static char tbuf3[TTYSIZ];
@@ -248,7 +246,7 @@ static void keyproc(void)
248246
}
249247

250248
uint8_t keyboard[8][8] = {
251-
#ifdef AZERTY
249+
#ifdef CONFIG_AZERTY
252250
{'>', 'q', 'b', 'c', 'd', 'e', 'f', 'g' },
253251
{'h', 'i', 'j', 'k', 'l', ',', 'n', 'o' },
254252
{'p', 'a', 'r', 's', 't', 'u', 'v', 'z' },
@@ -270,7 +268,7 @@ uint8_t keyboard[8][8] = {
270268
};
271269

272270
uint8_t shiftkeyboard[8][8] = {
273-
#ifdef AZERTY
271+
#ifdef CONFIG_AZERTY
274272
{'<', 'Q', 'B', 'C', 'D', 'E', 'F', 'G' },
275273
{'H', 'I', 'J', 'K', 'L', '?', 'N', 'O' },
276274
{'P', 'A', 'R', 'S', 'T', 'U', 'V', 'Z' },
@@ -322,7 +320,7 @@ static void keydecode(void)
322320
with control */
323321
if (keymap[7] & 4) { /* control */
324322
m |= KEYPRESS_CTRL;
325-
#ifdef AZERTY
323+
#ifdef CONFIG_AZERTY
326324
if (!(keymap[7] & 3)) { /* no shift */
327325
if (c == '&')
328326
c = '|';

0 commit comments

Comments
 (0)