Yann Garcia / MCP23017_I2C

Dependents:   MCP23017App

Revision:
1:ec9e770173d5
Parent:
0:ebd3a7cc9b92
Child:
2:3bea48e1505c
--- a/MCP23017_I2C.h	Fri Jan 09 14:37:42 2015 +0000
+++ b/MCP23017_I2C.h	Fri Jan 09 15:35:40 2015 +0000
@@ -1,4 +1,4 @@
-/* mbed simplified access to Microchip MCP28x17 GPIO expender devices (I2C)
+/* mbed simplified access to Microchip MCP23x17 GPIO expender devices (I2C)
  * Copyright (c) 2014-2015 ygarcia, MIT License
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 
@@ -116,6 +116,12 @@
          * @return 0 on success, negative value otherwise
          */
         virtual int setupInterruptPin(const unsigned char p_gpioId, const InterruptModes p_mode = OnRising);
+        
+        /** Get interrupt information and clear it
+         * @param p_gpioId The IO port identifier where the interrupt occured
+         * @param p_value  The logic value on the pin port where the interrupt occured
+         * @return 0 on success, negative value otherwise
+         */
         virtual int getLastInterruptPin(unsigned char * p_gpioId, unsigned char * p_value);
         
         virtual int read(const unsigned char p_gpioId, unsigned char * p_value);
@@ -123,8 +129,8 @@
         
         virtual unsigned char createBus(const std::list<unsigned char> p_lines, const PinMode p_mode = PullNone);
         virtual void deleteBus(const unsigned char p_busId);
-        virtual int busRead(const unsigned char p_busId);
-        virtual int busWrite(const unsigned char p_busId, const unsigned char p_value);
+        virtual int busRead(const unsigned char p_busId, unsigned short * p_value);
+        virtual int busWrite(const unsigned char p_busId, const unsigned short p_value);
         
         /** Attach a function to call when a interrupt occurs on the GPIOA input ports
          */