Re: odevice_ipaq, machine IDs and button init

Erik Hovland <[email protected]> Thu, 8 Feb 2007 15:07:57 -0800
Newsgroups gmane.comp.handhelds.opie.devel
Message-ID <[email protected]>
On Fri, Feb 09, 2007 at 01:04:12AM +1300, Paul Eggleton wrote:
> It seems to me we either need to renumber all of the devices so that only one 
> bit in the model mask is set (0x10001, 0x10002, 0x10004, 0x10008...), or we 
> come up with another way of associating buttons with multiple models.

Is the attached patch what you had in mind? I went a little bonkers and
made all models unique for their respective vendor family. I also made
the vendor families bit field unique.

E

-- 
Erik Hovland
mail: [email protected]
web: http://hovland.org/
PGP/GPG public key available on request

_______________________________________________

http://opie.handhelds.org/cgi-bin/moin.cgi/DeveloperWikiIndex

Opie-devel mailing list
[email protected]
https://handhelds.org/mailman/listinfo/opie-devel
fix-button-overlap.patch (text/plain, 1.5 KB)
Index: opie-i386/libopie2/opiecore/device/odevice.h
===================================================================
--- opie-i386.orig/libopie2/opiecore/device/odevice.h
+++ opie-i386/libopie2/opiecore/device/odevice.h
@@ -63,15 +63,15 @@ enum OModel {
     Model_iPAQ_All      = ( Model_iPAQ | 0xffff ),
     Model_iPAQ_H31xx    = ( Model_iPAQ | 0x0001 ),
     Model_iPAQ_H36xx    = ( Model_iPAQ | 0x0002 ),
-    Model_iPAQ_H37xx    = ( Model_iPAQ | 0x0003 ),
-    Model_iPAQ_H38xx    = ( Model_iPAQ | 0x0004 ),
-    Model_iPAQ_H39xx    = ( Model_iPAQ | 0x0005 ),
-    Model_iPAQ_H5xxx    = ( Model_iPAQ | 0x0006 ),
-    Model_iPAQ_H22xx    = ( Model_iPAQ | 0x0007 ),
-    Model_iPAQ_H191x    = ( Model_iPAQ | 0x0008 ),
-    Model_iPAQ_H1940    = ( Model_iPAQ | 0x0009 ),
-    Model_iPAQ_HX4700   = ( Model_iPAQ | 0x000A ),
-    Model_iPAQ_H4xxx    = ( Model_iPAQ | 0x000b ),
+    Model_iPAQ_H37xx    = ( Model_iPAQ | 0x0004 ),
+    Model_iPAQ_H38xx    = ( Model_iPAQ | 0x0008 ),
+    Model_iPAQ_H39xx    = ( Model_iPAQ | 0x0010 ),
+    Model_iPAQ_H5xxx    = ( Model_iPAQ | 0x0020 ),
+    Model_iPAQ_H22xx    = ( Model_iPAQ | 0x0040 ),
+    Model_iPAQ_H191x    = ( Model_iPAQ | 0x0080 ),
+    Model_iPAQ_H1940    = ( Model_iPAQ | 0x0100 ),
+    Model_iPAQ_HX4700   = ( Model_iPAQ | 0x0200 ),
+    Model_iPAQ_H4xxx    = ( Model_iPAQ | 0x0400 ),
     Model_Jornada       = ( 6 << 16 ),
     Model_Jornada_56x   = ( Model_Jornada | 0x0001 ),
     Model_Jornada_720   = ( Model_Jornada | 0x0002 ),