Basic library of routines to interface to a Microchip MCP23017 16-bit I/O expander using an I2C interface.
Dependents: acd52832_beep_buzzer_ints
Fork of MCP23017 by
Revision 10:a3b9eabb0e50, committed 2010-11-29
- Comitter:
- jimherd
- Date:
- Mon Nov 29 11:21:18 2010 +0000
- Parent:
- 9:e08c29541bc4
- Child:
- 11:8726c7be6d72
- Commit message:
Changed in this revision
MCP23017.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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