Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * hecubafb.h - definitions for the hecuba framebuffer driver
0003  *
0004  * Copyright (C) 2008 by Jaya Kumar
0005  *
0006  * This file is subject to the terms and conditions of the GNU General Public
0007  * License. See the file COPYING in the main directory of this archive for
0008  * more details.
0009  *
0010  */
0011 
0012 #ifndef _LINUX_HECUBAFB_H_
0013 #define _LINUX_HECUBAFB_H_
0014 
0015 /* Apollo controller specific defines */
0016 #define APOLLO_START_NEW_IMG    0xA0
0017 #define APOLLO_STOP_IMG_DATA    0xA1
0018 #define APOLLO_DISPLAY_IMG  0xA2
0019 #define APOLLO_ERASE_DISPLAY    0xA3
0020 #define APOLLO_INIT_DISPLAY 0xA4
0021 
0022 /* Hecuba interface specific defines */
0023 #define HCB_WUP_BIT 0x01
0024 #define HCB_DS_BIT  0x02
0025 #define HCB_RW_BIT  0x04
0026 #define HCB_CD_BIT  0x08
0027 #define HCB_ACK_BIT     0x80
0028 
0029 /* struct used by hecuba. board specific stuff comes from *board */
0030 struct hecubafb_par {
0031     struct fb_info *info;
0032     struct hecuba_board *board;
0033     void (*send_command)(struct hecubafb_par *, unsigned char);
0034     void (*send_data)(struct hecubafb_par *, unsigned char);
0035 };
0036 
0037 /* board specific routines
0038 board drivers can implement wait_for_ack with interrupts if desired. if
0039 wait_for_ack is called with clear=0, then go to sleep and return when ack
0040 goes hi or if wait_for_ack with clear=1, then return when ack goes lo */
0041 struct hecuba_board {
0042     struct module *owner;
0043     void (*remove)(struct hecubafb_par *);
0044     void (*set_ctl)(struct hecubafb_par *, unsigned char, unsigned char);
0045     void (*set_data)(struct hecubafb_par *, unsigned char);
0046     void (*wait_for_ack)(struct hecubafb_par *, int);
0047     int (*init)(struct hecubafb_par *);
0048 };
0049 
0050 
0051 #endif