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

Fork of MCP23S17 by Romilly Cocking

Revision:
10:ca0429a15915
Parent:
9:068b1e8909bb
--- a/MCP23S17.h	Sat Aug 28 09:48:38 2010 +0000
+++ b/MCP23S17.h	Sun Mar 02 18:15:17 2014 +0000
@@ -34,7 +34,7 @@
 
 class MCP23S17 {
 public:
-    MCP23S17(SPI& spi, PinName ncs, char writeOpcode);
+    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);
@@ -45,7 +45,7 @@
     char read(Port port);
     void write(Port port, char byte);
 protected:
-    SPI& _spi;
+    SPI* _spi;
     DigitalOut _ncs;
     void _init();
     void _write(Port port, char address, char data);