OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [devs/] [framebuf/] [synth/] [current/] [src/] [protocol.h] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
//==========================================================================
2
//
3
//      protocol.h
4
//
5
//      Data common to host and target.
6
//
7
//==========================================================================
8
// ####ECOSGPLCOPYRIGHTBEGIN####                                            
9
// -------------------------------------------                              
10
// This file is part of eCos, the Embedded Configurable Operating System.   
11
// Copyright (C) 2008 Free Software Foundation, Inc.                        
12
//
13
// eCos is free software; you can redistribute it and/or modify it under    
14
// the terms of the GNU General Public License as published by the Free     
15
// Software Foundation; either version 2 or (at your option) any later      
16
// version.                                                                 
17
//
18
// eCos is distributed in the hope that it will be useful, but WITHOUT      
19
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or    
20
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License    
21
// for more details.                                                        
22
//
23
// You should have received a copy of the GNU General Public License        
24
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
25
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
26
//
27
// As a special exception, if other files instantiate templates or use      
28
// macros or inline functions from this file, or you compile this file      
29
// and link it with other works to produce a work based on this file,       
30
// this file does not by itself cause the resulting work to be covered by   
31
// the GNU General Public License. However the source code for this file    
32
// must still be made available in accordance with section (3) of the GNU   
33
// General Public License v2.                                               
34
//
35
// This exception does not invalidate any other reasons why a work based    
36
// on this file might be covered by the GNU General Public License.         
37
// -------------------------------------------                              
38
// ####ECOSGPLCOPYRIGHTEND####                                              
39
//==========================================================================
40
//###DESCRIPTIONBEGIN####
41
//
42
// Author(s):     bartv
43
// Date:          2005-10-28
44
//
45
//###DESCRIPTIONEND####
46
//========================================================================
47
 
48
// These requests are sent by eCos to the I/O auxiliary and the
49
// framebuf.tcl script.
50
//
51
// Protocol version number
52
#define SYNTH_FB_PROTOCOL_VERSION   0x01
53
 
54
// Initialize, getting back various file names.
55
#define SYNTH_FB_INIT               0x01
56
// Abort, failed to open the file names
57
#define SYNTH_FB_ABORT              0x02
58
// Switch a device back on.
59
#define SYNTH_FB_ON                 0x03
60
// Or off
61
#define SYNTH_FB_OFF                0x04
62
 
63
// These requests are sent by eCos to the host-side framebuf program
64
// to indicate what has changed.
65
//
66
// All connected
67
#define SYNTH_FB_OK                 0x01
68
// A double buffer synch.
69
#define SYNTH_FB_SYNC               0x02
70
// Palette change, redraw the lot
71
#define SYNTH_FB_WRITE_PALETTE      0x03
72
// Blank or unblank the screen
73
#define SYNTH_FB_BLANK              0x04
74
// Move the viewport
75
#define SYNTH_FB_VIEWPORT           0x05
76
// Page flipping
77
#define SYNTH_FB_PAGE_FLIP          0x06
78
 
79
// These requests go from the framebuf.tcl script to the framebuf
80
// program.
81
typedef struct synth_fb_auxiliary_request {
82
    unsigned int command;
83
    unsigned int arg1;
84
    unsigned int arg2;
85
} synth_fb_auxiliary_request;
86
 
87
// This is sent when the frame becomes visible. It is followed
88
// by a 32-bit windows id.
89
#define SYNTH_FB_AUX_MAPPED         0x01
90
// ON, processed by auxiliary and then passed on to framebuf
91
#define SYNTH_FB_AUX_ON             0x02
92
// OFF, processed by auxiliary and then passed on to framebuf
93
#define SYNTH_FB_AUX_OFF            0x03
94
// Refresh, sent by the auxiliary a second after mapping.
95
#define SYNTH_FB_AUX_REDRAW         0x04
96
 
97
// This data structure is in the shared memory region.
98
typedef struct synth_fb_data {
99
    // Do we have a connection to a host-side framebuf program to do
100
    // the drawing?
101
    int             connected;
102
    // Named fifo between framebuf and the synthetic target.
103
    int             fifo_to_framebuf;
104
    int             fifo_from_framebuf;
105
    // The device id for the auxiliary
106
    int             devid;
107
    // The bounding box for syncs.
108
    int             sync_x0;
109
    int             sync_y0;
110
    int             sync_x1;
111
    int             sync_y1;
112
    // Is the display on?
113
    int             display_on;
114
    // Current blank state
115
    int             blank_on;
116
    // Current viewport position, top left
117
    int             viewport_x;
118
    int             viewport_y;
119
    // Current page for page flipping
120
    int             page_visible;
121
    int             page_drawable;
122
    // The palette, if used.
123
    unsigned char   palette[3 * 256];
124
    // The framebuffer data follows.
125
    unsigned int    framebuf[1];
126
} synth_fb_data;

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.