Forked from romilly. Changed the way SPI handler is injected in constructor

Fork of MCP23S17 by Romilly Cocking

Revision:
9:068b1e8909bb
Parent:
8:841b19734955
Child:
10:ca0429a15915
--- a/MCP23S17.h	Mon Aug 23 10:57:59 2010 +0000
+++ b/MCP23S17.h	Sat Aug 28 09:48:38 2010 +0000
@@ -2,7 +2,7 @@
 * Copyright (c) 2010 Romilly Cocking
 * Released under the MIT License: http://mbed.org/license/mit
 *
-* version 0.3
+* version 0.4
 */
 #include "mbed.h"
 
@@ -15,16 +15,13 @@
 // all register addresses assume IOCON.BANK = 0 (POR default)
 
 #define IODIRA   0x00
-#define IODIRB   0x01
 #define GPINTENA 0x04
-#define GPINTENB 0x05
 #define DEFVALA  0x06
 #define INTCONA  0x08
 #define IOCON    0x0A
+#define GPPUA    0x0C
 #define GPIOA    0x12
-#define GPIOB    0x13
 #define OLATA    0x14
-#define OLATB    0x15
 
 // Control settings
 
@@ -39,6 +36,7 @@
 public:
     MCP23S17(SPI& spi, PinName ncs, char writeOpcode);
     void direction(Port port, char direction);
+    void configurePullUps(Port port, char offOrOn);
     void interruptEnable(Port port, char interruptsEnabledMask);
     void interruptPolarity(Polarity polarity);
     void mirrorInterrupts(bool mirror);