~vcs-imports/lcd4linux/trunk

« back to all changes in this revision

Viewing changes to drv_SamsungSPF.h

  • Committer: michael
  • Date: 2012-02-23 06:36:53 UTC
  • Revision ID: svn-v4:3ae390bd-cb1e-0410-b409-cd5a39f66f1f:trunk:1178
some fixes from Sascha Plazar

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: drv_SamsungSPF 975 2009-01-18 11:16:20Z michael $
2
 
   * $URL: https://ssl.bulix.org/svn/lcd4linux/trunk/drv_SamsungSPF.c $
3
 
   *
4
 
   * sample lcd4linux driver
5
 
   *
6
 
   * Copyright (C) 2012 Sascha Plazar <sascha@plazar.de>
7
 
   * Copyright (C) 2005, 2006, 2007 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net>
8
 
   *
9
 
   * This file is part of LCD4Linux.
10
 
   *
11
 
   * LCD4Linux is free software; you can redistribute it and/or modify
12
 
   * it under the terms of the GNU General Public License as published by
13
 
   * the Free Software Foundation; either version 2, or (at your option)
14
 
   * any later version.
15
 
   *
16
 
   * LCD4Linux is distributed in the hope that it will be useful,
17
 
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 
   * GNU General Public License for more details.
20
 
   *
21
 
   * You should have received a copy of the GNU General Public License
22
 
   * along with this program; if not, write to the Free Software
23
 
   * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
 
   *
25
 
   */
26
 
 
27
 
// Drivername for verbose output
28
 
static char Name[] = "SamsungSPF";
29
 
 
30
 
#define USB_HDR_LEN 12
31
 
 
32
 
struct SPFdev {
33
 
    const char type[64];
34
 
    const int vendorID;
35
 
    struct {
36
 
        const int storageMode;
37
 
        const int monitorMode;
38
 
    } productID;
39
 
    const unsigned int xRes;
40
 
    const unsigned int yRes;
41
 
};
42
 
 
43
 
static struct SPFdev spfDevices[] = {
44
 
    {
45
 
     .type = "SPF-75H",
46
 
     .vendorID = 0x04e8,
47
 
     .productID = {0x200e, 0x200f},
48
 
     .xRes = 800,
49
 
     .yRes = 480,
50
 
     },
51
 
    {
52
 
     .type = "SPF-85H",
53
 
     .vendorID = 0x04e8,
54
 
     .productID = {0x2012, 0x2013},
55
 
     .xRes = 800,
56
 
     .yRes = 600,
57
 
     },
58
 
    {
59
 
     .type = "SPF-107H",
60
 
     .vendorID = 0x04e8,
61
 
     .productID = {0x2027, 0x2028},
62
 
     .xRes = 1024,
63
 
     .yRes = 600,
64
 
     },
65
 
};
66
 
 
67
 
static int numFrames = sizeof(spfDevices) / sizeof(spfDevices[0]);
68
 
 
69
 
struct usb_device *myDev;
70
 
usb_dev_handle *myDevHandle;
71
 
struct SPFdev *myFrame;
72
 
 
73
 
typedef struct {
74
 
    unsigned char R, G, B;
75
 
} RGB;
76
 
 
77
 
static struct {
78
 
    RGB *buf;
79
 
    int dirty;
80
 
    int fbsize;
81
 
} image;
82
 
 
83
 
static struct {
84
 
    unsigned char *buf;
85
 
    long int size;
86
 
} jpegImage;