Skip to content

Commit 33d1f71

Browse files
author
michael
committed
DPF driver by Stefan Kuhne 8note that you need libdpf)
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1168 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
1 parent 0b52f08 commit 33d1f71

File tree

9 files changed

+337
-4
lines changed

9 files changed

+337
-4
lines changed

Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ drv_Crystalfontz.c \
7878
drv_Curses.c \
7979
drv_Cwlinux.c \
8080
drv_D4D.c \
81+
drv_dpf.c \
8182
drv_EA232graphic.c \
8283
drv_EFN.c \
8384
drv_FW8888.c \

Makefile.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ AM_CFLAGS = -D_GNU_SOURCE -Wall -Wextra -fno-strict-aliasing
251251
ACLOCAL_AMFLAGS = -I m4
252252
# use this for lots of warnings
253253
#AM_CFLAGS = -D_GNU_SOURCE -std=c99 -m64 -Wall -W -pedantic -Wno-variadic-macros -fno-strict-aliasing
254-
lcd4linux_LDFLAGS =
254+
lcd4linux_LDFLAGS = "-Wl,--as-needed"
255255
lcd4linux_LDADD = @DRIVERS@ @PLUGINS@ @DRVLIBS@ @PLUGINLIBS@
256256
lcd4linux_DEPENDENCIES = @DRIVERS@ @PLUGINS@
257257
lcd4linux_SOURCES = \
@@ -310,6 +310,7 @@ drv_Crystalfontz.c \
310310
drv_Curses.c \
311311
drv_Cwlinux.c \
312312
drv_D4D.c \
313+
drv_dpf.c \
313314
drv_EA232graphic.c \
314315
drv_EFN.c \
315316
drv_FW8888.c \
@@ -570,6 +571,7 @@ distclean-compile:
570571
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_USBLCD.Po@am__quote@
571572
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_WincorNixdorf.Po@am__quote@
572573
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_X11.Po@am__quote@
574+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_dpf.Po@am__quote@
573575
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_generic.Po@am__quote@
574576
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_generic_gpio.Po@am__quote@
575577
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_generic_graphic.Po@am__quote@

config.h.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
/* Define to 1 if you have the <inttypes.h> header file. */
6868
#undef HAVE_INTTYPES_H
6969

70+
/* Define to 1 if you have the <libdpf/libdpf.h> header file. */
71+
#undef HAVE_LIBDPF_LIBDPF_H
72+
7073
/* Define to 1 if you have the `m' library (-lm). */
7174
#undef HAVE_LIBM
7275

@@ -492,6 +495,9 @@
492495
/* Define if using the dmalloc debugging malloc package */
493496
#undef WITH_DMALLOC
494497

498+
/* DPF driver */
499+
#undef WITH_DPF
500+
495501
/* Electronic Assembly RS232 graphic driver */
496502
#undef WITH_EA232graphic
497503

configure

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ Optional Packages:
14421442
drivers may be excluded with 'all,!<driver>',
14431443
(try 'all,\!<driver>' if your shell complains...)
14441444
possible drivers are:
1445-
ASTUSB, BeckmannEgle, BWCT, CrystalFontz, Curses, Cwlinux, D4D,
1445+
ASTUSB, BeckmannEgle, BWCT, CrystalFontz, Curses, Cwlinux, D4D, DPF
14461446
EA232Graphic, EFN, FW8888, G15, GLCD2USB, HD44780, HD44780-I2C,
14471447
IRLCD, LCD2USB, LCDLinux, LEDMatrix, LCDTerm, LPH7508, LUIse,
14481448
LW_ABP, M50530, MatrixOrbital, MatrixOrbitalGX, MilfordInstruments, MDM166A,
@@ -5690,6 +5690,22 @@ fi
56905690
done
56915691

56925692

5693+
# check for libdpf libs
5694+
for ac_header in libdpf/libdpf.h
5695+
do :
5696+
ac_fn_c_check_header_mongrel "$LINENO" "libdpf/libdpf.h" "ac_cv_header_libdpf_libdpf_h" "$ac_includes_default"
5697+
if test "x$ac_cv_header_libdpf_libdpf_h" = xyes; then :
5698+
cat >>confdefs.h <<_ACEOF
5699+
#define HAVE_LIBDPF_LIBDPF_H 1
5700+
_ACEOF
5701+
has_libdpf="true"
5702+
else
5703+
has_libdpf="false"
5704+
fi
5705+
5706+
done
5707+
5708+
56935709
# check for vncserver libs
56945710
for ac_header in rfb/rfb.h
56955711
do :
@@ -6261,6 +6277,7 @@ for driver in $drivers; do
62616277
CURSES="yes"
62626278
CWLINUX="yes"
62636279
D4D="yes"
6280+
DPF="yes"
62646281
EA232graphic="yes"
62656282
EFN="yes"
62666283
FW8888="yes"
@@ -6327,6 +6344,9 @@ for driver in $drivers; do
63276344
D4D)
63286345
D4D=$val
63296346
;;
6347+
DPF)
6348+
DPF=$val
6349+
;;
63306350
EA232graphic)
63316351
EA232graphic=$val
63326352
;;
@@ -6573,6 +6593,20 @@ $as_echo "#define WITH_D4D 1" >>confdefs.h
65736593

65746594
fi
65756595

6596+
if test "$DPF" = "yes"; then
6597+
if test "$has_libdpf" = "true"; then
6598+
GRAPHIC="yes"
6599+
DRIVERS="$DRIVERS drv_dpf.o"
6600+
DRVLIBS="$DRVLIBS -Llibdpf -ldpf -lusb"
6601+
6602+
$as_echo "#define WITH_DPF 1" >>confdefs.h
6603+
6604+
else
6605+
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdpf.h not found: DPF driver disabled" >&5
6606+
$as_echo "$as_me: WARNING: libdpf.h not found: DPF driver disabled" >&2;}
6607+
fi
6608+
fi
6609+
65766610
if test "$EA232graphic" = "yes"; then
65776611
GRAPHIC="yes"
65786612
SERIAL="yes"
@@ -7030,6 +7064,7 @@ $as_echo "$as_me: WARNING: st2205.h not found: st2205 driver disabled" >&2;}
70307064
fi
70317065
fi
70327066

7067+
70337068
if test "$T6963" = "yes"; then
70347069
if test "$has_parport" = "true"; then
70357070
GRAPHIC="yes"

configure.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ AC_CHECK_HEADERS(serdisplib/serdisp.h, [has_serdisplib="true"], [has_serdisplib=
8484
# check for st2205 libs
8585
AC_CHECK_HEADERS(st2205.h, [has_st2205="true"], [has_st2205="false"])
8686

87+
# check for libdpf libs
88+
AC_CHECK_HEADERS(libdpf/libdpf.h, [has_libdpf="true"], [has_libdpf="false"])
89+
8790
# check for vncserver libs
8891
AC_CHECK_HEADERS(rfb/rfb.h, [has_vncserverlib="true"], [has_vncserverlib="false"])
8992

drivers.m4

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ AC_ARG_WITH(
3232
[ drivers may be excluded with 'all,!<driver>',]
3333
[ (try 'all,\!<driver>' if your shell complains...)]
3434
[ possible drivers are:]
35-
[ ASTUSB, BeckmannEgle, BWCT, CrystalFontz, Curses, Cwlinux, D4D,]
35+
[ ASTUSB, BeckmannEgle, BWCT, CrystalFontz, Curses, Cwlinux, D4D, DPF]
3636
[ EA232Graphic, EFN, FW8888, G15, GLCD2USB, HD44780, HD44780-I2C,]
3737
[ IRLCD, LCD2USB, LCDLinux, LEDMatrix, LCDTerm, LPH7508, LUIse,]
3838
[ LW_ABP, M50530, MatrixOrbital, MatrixOrbitalGX, MilfordInstruments, MDM166A,]
@@ -67,6 +67,7 @@ for driver in $drivers; do
6767
CURSES="yes"
6868
CWLINUX="yes"
6969
D4D="yes"
70+
DPF="yes"
7071
EA232graphic="yes"
7172
EFN="yes"
7273
FW8888="yes"
@@ -133,6 +134,9 @@ for driver in $drivers; do
133134
D4D)
134135
D4D=$val
135136
;;
137+
DPF)
138+
DPF=$val
139+
;;
136140
EA232graphic)
137141
EA232graphic=$val
138142
;;
@@ -361,6 +365,17 @@ if test "$D4D" = "yes"; then
361365
AC_DEFINE(WITH_D4D,1,[D4D driver])
362366
fi
363367

368+
if test "$DPF" = "yes"; then
369+
if test "$has_libdpf" = "true"; then
370+
GRAPHIC="yes"
371+
DRIVERS="$DRIVERS drv_dpf.o"
372+
DRVLIBS="$DRVLIBS -Llibdpf -ldpf -lusb"
373+
AC_DEFINE(WITH_DPF,1,[DPF driver])
374+
else
375+
AC_MSG_WARN(libdpf.h not found: DPF driver disabled)
376+
fi
377+
fi
378+
364379
if test "$EA232graphic" = "yes"; then
365380
GRAPHIC="yes"
366381
SERIAL="yes"
@@ -725,6 +740,7 @@ if test "$ST2205" = "yes"; then
725740
fi
726741
fi
727742

743+
728744
if test "$T6963" = "yes"; then
729745
if test "$has_parport" = "true"; then
730746
GRAPHIC="yes"

drv.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ extern DRIVER drv_Crystalfontz;
5454
extern DRIVER drv_Curses;
5555
extern DRIVER drv_Cwlinux;
5656
extern DRIVER drv_D4D;
57+
extern DRIVER drv_DPF;
5758
extern DRIVER drv_EA232graphic;
5859
extern DRIVER drv_EFN;
5960
extern DRIVER drv_FW8888;
@@ -127,6 +128,9 @@ DRIVER *Driver[] = {
127128
#ifdef WITH_D4D
128129
&drv_D4D,
129130
#endif
131+
#ifdef WITH_DPF
132+
&drv_DPF,
133+
#endif
130134
#ifdef WITH_EA232graphic
131135
&drv_EA232graphic,
132136
#endif

0 commit comments

Comments
 (0)