From 7c8ad477c8bc510721a3b30b2061ca23d5e9d6fe Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 9 Jul 2019 22:09:06 -0700 Subject: [PATCH] display: Fix mode variable used in type340 display to be enum. --- display/type340.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/display/type340.c b/display/type340.c index 5f238ab9..cffb70d2 100644 --- a/display/type340.c +++ b/display/type340.c @@ -151,7 +151,7 @@ ty340_set_dac(ty340word addr) DEBUGF(("set DAC %06o\r\n", u->DAC)); /* XXX only when reset? */ - u->mode = 0; + u->mode = PARAM; u->status = 0; /* XXX just clear stopped? */ ty340_rfd(); /* ready for data */ } @@ -168,7 +168,7 @@ ty340_reset(void *dptr) } #endif u->xpos = u->ypos = 0; - u->mode = 0; + u->mode = PARAM; u->status = 0; u->scale = 1; #if TYPE342 @@ -834,7 +834,7 @@ ty340_instruction(ty340word inst) } /* READ TO MODE: */ - u->mode = GETFIELD(inst, 2, 4); + u->mode = (enum mode)GETFIELD(inst, 2, 4); if (TESTBIT(inst, 5)) { /* load l.p. enable */ u->lp_ena = TESTBIT(inst,6); DEBUGF(("type340 lp_ena %d\r\n", u->lp_ena)); @@ -862,7 +862,7 @@ ty340_instruction(ty340word inst) break; case POINT: - u->mode = GETFIELD(inst, 2, 4); + u->mode = (enum mode)GETFIELD(inst, 2, 4); if (TESTBIT(inst, 5)) { /* load l.p. enable */ u->lp_ena = TESTBIT(inst,6); @@ -885,7 +885,7 @@ ty340_instruction(ty340word inst) case SLAVE: DEBUGF(("type340 slave %06o\r\n", inst)); - u->mode = GETFIELD(inst, 2, 4); + u->mode = (enum mode)GETFIELD(inst, 2, 4); #if TYPE343 /* control multiple windows???? */ #else @@ -943,7 +943,7 @@ ty340_instruction(ty340word inst) #if TYPE347 /* type 347 Display Subroutine Option? */ - u->mode = GETFIELD(inst, 2, 4); + u->mode = (enum mode)GETFIELD(inst, 2, 4); addr = GETFIELD(inst, 5, 17); switch (GETFIELD(inst, 0, 1)) {