Commit eafd9557 authored by michael's avatar michael

driver for Samsung SPF by Sascha Plazar

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1177 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
parent c5fc726e
......@@ -110,6 +110,7 @@ drv_picoLCD.c \
drv_picoLCDGraphic.c \
drv_RouterBoard.c \
drv_Sample.c \
drv_SamsungSPF.c \
drv_st2205.c \
drv_serdisplib.c \
drv_ShuttleVFD.c \
......
......@@ -346,6 +346,7 @@ drv_picoLCD.c \
drv_picoLCDGraphic.c \
drv_RouterBoard.c \
drv_Sample.c \
drv_SamsungSPF.c \
drv_st2205.c \
drv_serdisplib.c \
drv_ShuttleVFD.c \
......@@ -568,6 +569,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_Pertelian.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_RouterBoard.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_Sample.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_SamsungSPF.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_ShuttleVFD.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_SimpleLCD.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_T6963.Po@am__quote@
......
......@@ -67,6 +67,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <jpeglib.h> header file. */
#undef HAVE_JPEGLIB_H
/* Define to 1 if you have the <libdpf/libdpf.h> header file. */
#undef HAVE_LIBDPF_LIBDPF_H
......@@ -606,6 +609,9 @@
/* Sample driver */
#undef WITH_SAMPLE
/* SamsungSPF driver */
#undef WITH_SAMSUNGSPF
/* serdisplib driver */
#undef WITH_SERDISPLIB
......
......@@ -1448,7 +1448,7 @@ Optional Packages:
LW_ABP, M50530, MatrixOrbital, MatrixOrbitalGX, MilfordInstruments, MDM166A,
Newhaven, Noritake, NULL, Pertelian, PHAnderson,
PICGraphic, picoLCD, picoLCDGraphic, PNG, PPM, RouterBoard,
Sample, serdisplib, ShuttleVFD, SimpleLCD, st2205, T6963,
Sample, SamsungSPF, serdisplib, ShuttleVFD, SimpleLCD, st2205, T6963,
TeakLCM, Trefon, ULA200, USBHUB, USBLCD, VNC, WincorNixdorf, X11
--with-plugins=<list> choose which plugins to compile.
type --with-plugins=list for a list
......@@ -5596,6 +5596,22 @@ fi
done
# check for jpeglib.h
for ac_header in jpeglib.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
if test "x$ac_cv_header_jpeglib_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_JPEGLIB_H 1
_ACEOF
has_jpeglib="true"
else
has_jpeglib="false"
fi
done
# check for sys/io.h (RouterBoard driver)
for ac_header in sys/io.h
do :
......@@ -6313,6 +6329,7 @@ for driver in $drivers; do
PPM="yes"
ROUTERBOARD="yes"
SAMPLE="yes"
SAMSUNGSPF="yes"
ST2205="yes"
SERDISPLIB="yes"
SHUTTLEVFD="yes"
......@@ -6450,6 +6467,9 @@ for driver in $drivers; do
Sample)
SAMPLE=$val
;;
SamsungSPF)
SAMSUNGSPF=$val
;;
serdisplib)
SERDISPLIB=$val;
;;
......@@ -7035,6 +7055,26 @@ $as_echo "$as_me: WARNING: asm/io.h or {linux/parport.h and linux/ppdev.h} not f
fi
fi
if test "$SAMSUNGSPF" = "yes"; then
if test "$has_usb" = "true"; then
if test "$has_usb" = "true"; then
GRAPHIC="yes"
DRIVERS="$DRIVERS drv_SamsungSPF.o"
LIBUSB="yes"
LIBJPEG="yes"
$as_echo "#define WITH_SAMSUNGSPF 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: jpeglib.h not found: SamsungSPF driver disabled" >&5
$as_echo "$as_me: WARNING: jpeglib.h not found: SamsungSPF driver disabled" >&2;}
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: usb.h not found: SamsungSPF driver disabled" >&5
$as_echo "$as_me: WARNING: usb.h not found: SamsungSPF driver disabled" >&2;}
fi
fi
if test "$SERDISPLIB" = "yes"; then
if test "$has_serdisplib" = "true"; then
GRAPHIC="yes"
......@@ -7278,6 +7318,11 @@ if test "$KEYPAD" = "yes"; then
DRIVERS="$DRIVERS drv_generic_keypad.o"
fi
# libjpeg
if test "$LIBJPEG" = "yes"; then
DRVLIBS="$DRVLIBS -ljpeg"
fi
# libusb
if test "$LIBUSB" = "yes"; then
DRVLIBS="$DRVLIBS -lusb"
......
......@@ -66,6 +66,9 @@ fi
# check for gd.h
AC_CHECK_HEADERS(gd/gd.h gd.h, [has_gd="true"; break], [has_gd="false"])
# check for jpeglib.h
AC_CHECK_HEADERS(jpeglib.h, [has_jpeglib="true"], [has_jpeglib="false"])
# check for sys/io.h (RouterBoard driver)
AC_CHECK_HEADERS(sys/io.h, [has_io_h="true"], [has_io_h="false"])
......
......@@ -38,7 +38,7 @@ AC_ARG_WITH(
[ LW_ABP, M50530, MatrixOrbital, MatrixOrbitalGX, MilfordInstruments, MDM166A,]
[ Newhaven, Noritake, NULL, Pertelian, PHAnderson,]
[ PICGraphic, picoLCD, picoLCDGraphic, PNG, PPM, RouterBoard,]
[ Sample, serdisplib, ShuttleVFD, SimpleLCD, st2205, T6963,]
[ Sample, SamsungSPF, serdisplib, ShuttleVFD, SimpleLCD, st2205, T6963,]
[ TeakLCM, Trefon, ULA200, USBHUB, USBLCD, VNC, WincorNixdorf, X11],
drivers=$withval,
drivers=all
......@@ -101,6 +101,7 @@ for driver in $drivers; do
PPM="yes"
ROUTERBOARD="yes"
SAMPLE="yes"
SAMSUNGSPF="yes"
ST2205="yes"
SERDISPLIB="yes"
SHUTTLEVFD="yes"
......@@ -238,6 +239,9 @@ for driver in $drivers; do
Sample)
SAMPLE=$val
;;
SamsungSPF)
SAMSUNGSPF=$val
;;
serdisplib)
SERDISPLIB=$val;
;;
......@@ -717,6 +721,22 @@ if test "$SAMPLE" = "yes"; then
fi
fi
if test "$SAMSUNGSPF" = "yes"; then
if test "$has_usb" = "true"; then
if test "$has_usb" = "true"; then
GRAPHIC="yes"
DRIVERS="$DRIVERS drv_SamsungSPF.o"
LIBUSB="yes"
LIBJPEG="yes"
AC_DEFINE(WITH_SAMSUNGSPF,1,[SamsungSPF driver])
else
AC_MSG_WARN(jpeglib.h not found: SamsungSPF driver disabled)
fi
else
AC_MSG_WARN(usb.h not found: SamsungSPF driver disabled)
fi
fi
if test "$SERDISPLIB" = "yes"; then
if test "$has_serdisplib" = "true"; then
GRAPHIC="yes"
......@@ -915,6 +935,11 @@ if test "$KEYPAD" = "yes"; then
DRIVERS="$DRIVERS drv_generic_keypad.o"
fi
# libjpeg
if test "$LIBJPEG" = "yes"; then
DRVLIBS="$DRVLIBS -ljpeg"
fi
# libusb
if test "$LIBUSB" = "yes"; then
DRVLIBS="$DRVLIBS -lusb"
......
......@@ -86,6 +86,7 @@ extern DRIVER drv_picoLCD;
extern DRIVER drv_picoLCDGraphic;
extern DRIVER drv_RouterBoard;
extern DRIVER drv_Sample;
extern DRIVER drv_SamsungSPF;
extern DRIVER drv_st2205;
extern DRIVER drv_serdisplib;
extern DRIVER drv_ShuttleVFD;
......@@ -226,6 +227,9 @@ DRIVER *Driver[] = {
#ifdef WITH_SAMPLE
&drv_Sample,
#endif
#ifdef WITH_SAMSUNGSPF
&drv_SamsungSPF,
#endif
#ifdef WITH_ST2205
&drv_st2205,
#endif
......
This diff is collapsed.
/* $Id: drv_SamsungSPF 975 2009-01-18 11:16:20Z michael $
* $URL: https://ssl.bulix.org/svn/lcd4linux/trunk/drv_SamsungSPF.c $
*
* sample lcd4linux driver
*
* Copyright (C) 2012 Sascha Plazar <sascha@plazar.de>
* Copyright (C) 2005, 2006, 2007 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net>
*
* This file is part of LCD4Linux.
*
* LCD4Linux is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* LCD4Linux is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
// Drivername for verbose output
static char Name[] = "SamsungSPF";
#define USB_HDR_LEN 12
struct SPFdev {
const char type[64];
const int vendorID;
struct {
const int storageMode;
const int monitorMode;
} productID;
const unsigned int xRes;
const unsigned int yRes;
};
static struct SPFdev spfDevices[] = {
{
.type = "SPF-75H",
.vendorID = 0x04e8,
.productID = {0x200e, 0x200f},
.xRes = 800,
.yRes = 480,
},
{
.type = "SPF-85H",
.vendorID = 0x04e8,
.productID = {0x2012, 0x2013},
.xRes = 800,
.yRes = 600,
},
{
.type = "SPF-107H",
.vendorID = 0x04e8,
.productID = {0x2027, 0x2028},
.xRes = 1024,
.yRes = 600,
},
};
static int numFrames = sizeof(spfDevices) / sizeof(spfDevices[0]);
struct usb_device *myDev;
usb_dev_handle *myDevHandle;
struct SPFdev *myFrame;
typedef struct {
unsigned char R, G, B;
} RGB;
static struct {
RGB *buf;
int dirty;
int fbsize;
} image;
static struct {
unsigned char *buf;
long int size;
} jpegImage;
......@@ -9,7 +9,7 @@ rm -f smoketest.log lcd4linux
make distclean
./bootstrap
for driver in ASTUSB BeckmannEgle BWCT CrystalFontz Curses Cwlinux D4D DPF EA232graphic EFN FutabaVFD G15 GLCD2USB HD44780 IRLCD LCD2USB LCDLinux LCDTerm LEDMatrix LPH7508 LUIse LW_ABP M50530 MatrixOrbital MatrixOrbitalGX MilfordInstruments Noritake NULL Pertelian PHAnderson picoLCD picoLCDGraphic PNG PPM RouterBoard Sample serdisplib SimpleLCD T6963 TeakLCM Trefon ULA200 USBHUB USBLCD WincorNixdorf X11; do
for driver in ASTUSB BeckmannEgle BWCT CrystalFontz Curses Cwlinux D4D DPF EA232graphic EFN FutabaVFD G15 GLCD2USB HD44780 IRLCD LCD2USB LCDLinux LCDTerm LEDMatrix LPH7508 LUIse LW_ABP M50530 MatrixOrbital MatrixOrbitalGX MilfordInstruments Noritake NULL Pertelian PHAnderson picoLCD picoLCDGraphic PNG PPM RouterBoard Sample SamsungSPF serdisplib SimpleLCD T6963 TeakLCM Trefon ULA200 USBHUB USBLCD WincorNixdorf X11; do
make distclean
./configure --with-drivers=$driver
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment