initial commit, reads dev id

Revision:
2:11e0b5b86e1e
Parent:
1:7ae9b934ee55
Child:
3:ad8f1059a0c5
--- a/MAX8614X.h	Sat Aug 11 00:37:58 2018 +0000
+++ b/MAX8614X.h	Sat Aug 11 10:25:54 2018 +0000
@@ -184,6 +184,15 @@
     static const uint8_t MAX8614X_INT1_EN_DIE_TEMP_MASK = (0x1 << 2);
     static const uint8_t MAX8614X_INT1_EN_VDD_OOR_MASK  = (0x1 << 1);
 
+    /*SHA256 Control*/
+    static const uint8_t MAX8614X_IE_SHA_DONE_EN          = (0x01 << 0);
+    static const uint8_t MAX8614X_SHACMD_SHA_START        = (0x01 << 0);
+    static const uint8_t MAX8614X_SHACMD_SHA_EN           = (0x01 << 1);
+    static const uint8_t MAX8614X_MEMCNTRL_BANK0_MASK     = (0);
+    static const uint8_t MAX8614X_MEMCNTRL_BANK1_MASK     = (1);
+    static const uint8_t MAX8614X_MEMCNTRL_WR_DIS_MASK    = (0x01 << 0);
+    static const uint8_t MAX8614X_MEMCNTRL_WR_EN_MASK     = (0x01 << 1);
+    
     /* PUBLIC TYPE DEFINITIONS */
     typedef struct RegisterMap {
         uint8_t addr;
@@ -222,6 +231,8 @@
 
     int writeBlock(const RegisterMap reg_block[], unsigned int size);
     void irq_handler(void);
+    bool isShaComplete(void);
+    void clearShaComplete(void);
         /* PUBLIC VARIABLES */
     InterruptIn m_ir;
         
@@ -230,6 +241,7 @@
     /* PRIVATE VARIABLES */
     SPI &m_spiBus;
     DigitalOut &m_cs;
+    bool shaComplete;
 
     /* PRIVATE FUNCTION DECLARATIONS */
 };