1 /* 2 * This file is part of x48, an emulator of the HP-48sx Calculator. 3 * Copyright (C) 1994 Eddie C. Dost (ecd@dressler.de) 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 */ 19 20 /* $Log: device.h,v $ 21 * Revision 1.7 1995/01/11 18:20:01 ecd 22 * major update to support HP48 G/GX 23 * 24 * Revision 1.6 1994/11/28 02:19:22 ecd 25 * played with the out register 26 * 27 * Revision 1.6 1994/11/28 02:19:22 ecd 28 * played with the out register 29 * 30 * Revision 1.5 1994/11/02 14:51:27 ecd 31 * added some function declarations 32 * 33 * Revision 1.4 1994/10/05 08:33:22 ecd 34 * remove addr queue 35 * 36 * Revision 1.3 1994/09/30 12:32:49 ecd 37 * added DISP_INSTR_OFF for faster and better display 38 * 39 * Revision 1.2 1994/09/13 16:58:42 ecd 40 * changed to plain X11 41 * 42 * Revision 1.1 1994/08/26 11:09:18 ecd 43 * Initial revision 44 * 45 * 46 * 47 * $Id: device.h,v 1.7 1995/01/11 18:20:01 ecd Exp ecd $ 48 */ 49 50 #ifndef _DEVICE_H 51 #define _DEVICE_H 1 52 53 #include "global.h" 54 55 #define DISP_INSTR_OFF 0x10 56 57 #define ANN_LEFT 0x81 58 #define ANN_RIGHT 0x82 59 #define ANN_ALPHA 0x84 60 #define ANN_BATTERY 0x88 61 #define ANN_BUSY 0x90 62 #define ANN_IO 0xa0 63 64 typedef struct device_t { 65 66 int display_touched; 67 68 char contrast_touched; 69 70 char disp_test_touched; 71 72 char crc_touched; 73 74 char power_status_touched; 75 char power_ctrl_touched; 76 77 char mode_touched; 78 79 char ann_touched; 80 81 char baud_touched; 82 83 char card_ctrl_touched; 84 char card_status_touched; 85 86 char ioc_touched; 87 88 char tcs_touched; 89 char rcs_touched; 90 91 char rbr_touched; 92 char tbr_touched; 93 94 char sreq_touched; 95 96 char ir_ctrl_touched; 97 98 char base_off_touched; 99 100 char lcr_touched; 101 char lbr_touched; 102 103 char scratch_touched; 104 char base_nibble_touched; 105 106 char unknown_touched; 107 108 char t1_ctrl_touched; 109 char t2_ctrl_touched; 110 111 char unknown2_touched; 112 113 char t1_touched; 114 char t2_touched; 115 116 } device_t; 117 118 extern device_t device; 119 extern void check_devices __ProtoType__((void)); 120 #if 0 121 extern void check_out_register __ProtoType__((void)); 122 #endif 123 124 extern void update_display __ProtoType__((void)); 125 extern void redraw_display __ProtoType__((void)); 126 extern void disp_draw_nibble __ProtoType__((word_20 addr, word_4 val)); 127 extern void menu_draw_nibble __ProtoType__((word_20 addr, word_4 val)); 128 extern void draw_annunc __ProtoType__((void)); 129 extern void redraw_annunc __ProtoType__((void)); 130 131 #endif /* !_DEVICE_H */ 132