author | sandman <sandman> | 2002-09-06 21:40:14 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-09-06 21:40:14 (UTC) |
commit | c22872aadda2ba93ddc53e5d5607ad795f147883 (patch) (side-by-side diff) | |
tree | 247c442995fec2e5e2ed9b5826f46a427333a410 | |
parent | e95e14f056ce6be658a4fd0d4737168431e92d88 (diff) | |
download | opie-c22872aadda2ba93ddc53e5d5607ad795f147883.zip opie-c22872aadda2ba93ddc53e5d5607ad795f147883.tar.gz opie-c22872aadda2ba93ddc53e5d5607ad795f147883.tar.bz2 |
Fix for the new OD_IO macros
-rw-r--r-- | libopie/odevice.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 6e3f114..9871e80 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -40,6 +40,8 @@ -#define OD_IO(type,area,number,args) (( type << 30 ) | ( area << 8 ) | ( number ) | ( sizeof( args ) << 16 )) -#define OD_IOW(area,number,args) OD_IO(1,area,number,args) -#define OD_IOR(area,number,args) OD_IO(2,area,number,args) -#define OD_IORW(area,number,args) OD_IO(3,area,number,args) +#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) + +#define OD_IO(type,number) OD_IOC(0,type,number,0) +#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) +#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) +#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) @@ -158,3 +160,3 @@ bool ODevice::setPowerButtonHandler ( ODevice::PowerButtonHandler ) -#define APM_IOC_SUSPEND OD_IO( 0, 'A', 2, 0 ) +#define APM_IOC_SUSPEND OD_IO( 'A', 2 ) @@ -200,3 +202,3 @@ bool ODevice::suspend ( ) -#define FBIOBLANK OD_IO( 0, 'F', 0x11, 0 ) // 0x4611 +#define FBIOBLANK OD_IO( 'F', 0x11 ) // 0x4611 |