Basic library of routines to interface to a Microchip MCP23017 16-bit I/O expander using an I2C interface.

Dependents:   Assignment_2_herpe Final_V1 ass2 ass2 ... more

Revision:
10:a3b9eabb0e50
Parent:
7:c282ea90cdb5
Child:
11:8726c7be6d72
--- a/MCP23017.h	Mon Nov 29 11:17:30 2010 +0000
+++ b/MCP23017.h	Mon Nov 29 11:21:18 2010 +0000
@@ -1,5 +1,6 @@
 /*  MCP23017 library for Arduino
     Copyright (C) 2009 David Pye    <davidmpye@gmail.com
+    Modified for use on the MBED
 
     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -67,7 +68,7 @@
      */   
     void write_bit(int value, int bit_number);
       
-    /** Write a 0/1 value to an output bit
+    /** Write a masked 16-bit value to the device
      *
      * @param   data    16-bit data value
      * @param   mask    16-bit mask value
@@ -81,7 +82,7 @@
      */       
     int  read_bit(int bit_number);
     
-    /** Read a 0/1 value from an input bit
+    /** Read a 16-bit value from the device and apply mask
      *
      * @param   mask    16-bit mask value
      * @return          16-bit data with mask applied