v 0.4

Dependents:   MCP23S17Test MCP23S17_Basic_IO_Demo HelloWorld Lab3-SnakeGame ... more

Revision:
9:068b1e8909bb
Parent:
8:841b19734955
--- 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);