Simplified access to Ramtron (Cypress) FM24Vxx F-RAM devices

Dependents:   FM24Vxx_I2CApp

Revision:
1:6a16bddd7222
Parent:
0:fa858f79d48d
--- a/FM24Vxx_IDs.h	Sat Mar 23 15:54:01 2013 +0000
+++ b/FM24Vxx_IDs.h	Wed Apr 03 12:51:20 2013 +0000
@@ -25,13 +25,13 @@
 
 /**
  * Device ID description
- * @remark See Figure 14. Manufacturer and Product ID
+ * @remark See FM24V10_ds Figure 14. Manufacturer and Product ID
  */
 class CFM24VXX_IDs {
 
     /** Device ID description
      */
-    struct {
+    struct { // FM24V10_ds Figure 14. Manufacturer and Product ID
         unsigned char manufacturerID;
         union {
             unsigned char id;
@@ -40,21 +40,24 @@
                 unsigned char density:4;
             } vd;
         } productID;
-        unsigned char dieRevision;
+        struct {
+            unsigned char dierev:3;
+            unsigned char reserved:5;
+        } dieRevision;
     } _deviceID;
     
     public:
         inline CFM24VXX_IDs(const unsigned char manufacturerID, const unsigned char productID, const unsigned char dieRevision) {
             _deviceID.manufacturerID = manufacturerID;
             _deviceID.productID.id = productID;
-            _deviceID.dieRevision = dieRevision;
+            _deviceID.dieRevision.dierev = dieRevision & 0x07; // FM24V10_ds Figure 14. Manufacturer and Product ID
         } // End of Constructor
         
         inline unsigned char GetManufacturerID() const { return _deviceID.manufacturerID; };
         
         inline unsigned char GetProductID() const { return _deviceID.productID.id; };
         
-        inline unsigned char GetRevisionID() const { return _deviceID.dieRevision; };
+        inline unsigned char GetRevisionID() const { return _deviceID.dieRevision.dierev; };
         
         inline unsigned char GetDensity() const { return _deviceID.productID.vd.density >> 4; };