1 // lcd-driver.h - description. -*- C++ -*-
3 // Copyright (C) 1999, 2000 Red Hat.
4 // This file is part of SID and is licensed under the GPL.
5 // See the file COPYING.SID for conditions for redistribution.
7 #ifndef LCD_DRIVER_DEFH
8 #define LCD_DRIVER_DEFH
14 volatile unsigned char* const DATA_REG;
15 volatile unsigned char* const CMD_REG;
16 volatile unsigned char* const STATUS_REG;
20 STA0 = 0x1, // set if ready to take next command
21 STA1 = 0x2, // set if memory ready
22 STA2 = 0x4, // set if auto read
23 STA3 = 0x8, // set if auto write
24 STA6 = 0x40, // set if peek/poke error
25 STA7 = 0x80, // set if display on
56 bool send_cmd( unsigned char cmd );
58 bool auto_write( unsigned char data );
59 bool auto_read( unsigned char& data );
60 bool reset_auto( unsigned char mode );
62 bool write_mem( unsigned char cmd, unsigned char data );
63 bool read_mem( unsigned char cmd, unsigned char& data );
65 bool set_word_reg( unsigned char cmd, unsigned char lo, unsigned char hi );
66 void mem_set( unsigned char val, unsigned addr, int len );
67 unsigned get_numcols() { return NCOLS;}
68 unsigned get_numrows() { return NROWS;}
69 // void initialize_lcd();
73 bool check_status( unsigned char what );
74 bool send_data( unsigned char data );
75 bool get_data ( unsigned char& data );
79 #endif // LCD_DRIVER_DEFH