Exteding Driver interface
authorJohn Hodge <tpg@prelude.(none)>
Tue, 19 Jan 2010 05:50:45 +0000 (13:50 +0800)
committerJohn Hodge <tpg@prelude.(none)>
Tue, 19 Jan 2010 05:50:45 +0000 (13:50 +0800)
- Changed 4-byte ID to a 31 byte string (32 with NULL terminator)
- Created a macro for the version numbers

Kernel/include/acess.h
Kernel/include/tpl_drv_common.h

index efc925e..24621b9 100644 (file)
@@ -20,6 +20,8 @@
 #define EXPAND_CONCAT(x,y) CONCAT(x,y)
 #define STR(x) #x
 #define EXPAND_STR(x) STR(x)
+
+#define VER3(major,minor,patch)        ((((major)&0xFF)<<16)|(((minor)&0xFF)<<8)|((patch)&0xFF))
 /**
  * \}
  */
index f20539a..31edb9c 100644 (file)
@@ -47,11 +47,11 @@ enum eTplDrv_IOCtl {
        DRV_IOCTL_TYPE,
        
        /**
-        * ioctl(..., char *dest[4])
+        * ioctl(..., char *dest[32])
         * \brief Get driver identifier string
         * \return 0 on no error
         * 
-        * This call sets the 4-byte array \a dest to the drivers 4-byte
+        * This call sets the 32-byte array \a dest to the drivers 31 charater
         * identifier. This identifier must be unique to the driver series.
         */
        DRV_IOCTL_IDENT,
@@ -59,10 +59,10 @@ enum eTplDrv_IOCtl {
        /**
         * ioctl(...)
         * \brief Get driver version number
-        * \return 24-bit BCD version number (2.2)
+        * \return 24-bit BCD version number (2.2.2)
         * 
-        * This call returns the 6-digit (2 major, 2 minor, 2 patch) version number
-        * of the driver.
+        * This call returns the 6-digit (2 major, 2 minor, 2 patch) version
+        * number of the driver.
         */
        DRV_IOCTL_VERSION,
        

UCC git Repository :: git.ucc.asn.au