summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_ipaq.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_ipaq.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_ipaq.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp
index 8ecea1b..177fd4c 100644
--- a/libopie2/opiecore/device/odevice_ipaq.cpp
+++ b/libopie2/opiecore/device/odevice_ipaq.cpp
@@ -32,48 +32,52 @@
32/* QT */ 32/* QT */
33#include <qapplication.h> 33#include <qapplication.h>
34#include <qfile.h> 34#include <qfile.h>
35#include <qtextstream.h> 35#include <qtextstream.h>
36#include <qwindowsystem_qws.h> 36#include <qwindowsystem_qws.h>
37 37
38/* OPIE */ 38/* OPIE */
39#include <qpe/config.h> 39#include <qpe/config.h>
40#include <qpe/resource.h> 40#include <qpe/resource.h>
41#include <qpe/sound.h> 41#include <qpe/sound.h>
42#include <qpe/qcopenvelope_qws.h> 42#include <qpe/qcopenvelope_qws.h>
43 43
44/* STD */ 44/* STD */
45#include <fcntl.h> 45#include <fcntl.h>
46#include <math.h> 46#include <math.h>
47#include <stdlib.h> 47#include <stdlib.h>
48#include <signal.h> 48#include <signal.h>
49#include <sys/ioctl.h> 49#include <sys/ioctl.h>
50#include <sys/time.h> 50#include <sys/time.h>
51#include <unistd.h> 51#include <unistd.h>
52#ifndef QT_NO_SOUND 52#ifndef QT_NO_SOUND
53#include <linux/soundcard.h> 53#include <linux/soundcard.h>
54#endif 54#endif
55 55
56
57using namespace Opie::Core;
58using namespace Opie::Core::Private;
59
56/* KERNEL */ 60/* KERNEL */
57#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) 61#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 ))
58 62
59#define OD_IO(type,number) OD_IOC(0,type,number,0) 63#define OD_IO(type,number) OD_IOC(0,type,number,0)
60#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) 64#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size))
61#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) 65#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size))
62#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) 66#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size))
63 67
64typedef struct { 68typedef struct {
65 unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */ 69 unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */
66 unsigned char TotalTime; /* Units of 5 seconds */ 70 unsigned char TotalTime; /* Units of 5 seconds */
67 unsigned char OnTime; /* units of 100m/s */ 71 unsigned char OnTime; /* units of 100m/s */
68 unsigned char OffTime; /* units of 100m/s */ 72 unsigned char OffTime; /* units of 100m/s */
69} LED_IN; 73} LED_IN;
70 74
71typedef struct { 75typedef struct {
72 unsigned char mode; 76 unsigned char mode;
73 unsigned char pwr; 77 unsigned char pwr;
74 unsigned char brightness; 78 unsigned char brightness;
75} FLITE_IN; 79} FLITE_IN;
76 80
77#define LED_ON OD_IOW( 'f', 5, LED_IN ) 81#define LED_ON OD_IOW( 'f', 5, LED_IN )
78#define FLITE_ON OD_IOW( 'f', 7, FLITE_IN ) 82#define FLITE_ON OD_IOW( 'f', 7, FLITE_IN )
79 83