aboutsummaryrefslogtreecommitdiffstats
path: root/glcd2usb.h
blob: 9ee88135f4aae4816cd6876474f2aa02e22b0bfc (plain)
1
2
3
4
pre { line-height: 125%; margin: 0; }
td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.hi
/*
 * glcd2usb.h - glcd2usb interface definitions
 */

#ifndef GLCD2USB_H
#define GLCD2USB_H

#define FLAG_SIX_BIT          (1<<0)
#define FLAG_VERTICAL_UNITS   (1<<1)
#define FLAG_BOTTOM_START     (1<<2)
#define FLAG_VERTICAL_INC     (1<<3)
#define FLAG_BACKLIGHT        (1<<4)

#define GLCD2USB_RID_GET_INFO      1	/* get display info */
#define GLCD2USB_RID_SET_ALLOC     2	/* allocate/free display */
#define GLCD2USB_RID_GET_BUTTONS   3	/* get state of the four buttons */
#define GLCD2USB_RID_SET_BL        4	/* set backlight brightness */
#define GLCD2USB_RID_GET_IR        5	/* get last ir message */
#define GLCD2USB_RID_WRITE         8	/* write some bitmap data to the display */
#define GLCD2USB_RID_WRITE_4       (GLCD2USB_RID_WRITE+0)
#define GLCD2USB_RID_WRITE_8       (GLCD2USB_RID_WRITE+1)
#define GLCD2USB_RID_WRITE_16      (GLCD2USB_RID_WRITE+2)
#define GLCD2USB_RID_WRITE_32      (GLCD2USB_RID_WRITE+3)
#define GLCD2USB_RID_WRITE_64      (GLCD2USB_RID_WRITE+4)
#define GLCD2USB_RID_WRITE_128     (GLCD2USB_RID_WRITE+5)

typedef struct {
    unsigned char report_id;
    char name[32];
    unsigned short width, height;
    unsigned char flags;
} __attribute__ ((packed)) display_info_t;

#endif				// GLCD2USB_H