Forked from romilly. Changed the way SPI handler is injected in constructor
Fork of MCP23S17 by
Diff: MCP23S17.h
- Revision:
- 4:d501c74550a0
- Parent:
- 3:089a2a754567
- Child:
- 5:cb3c24f94370
diff -r 089a2a754567 -r d501c74550a0 MCP23S17.h --- a/MCP23S17.h Sun Aug 22 12:05:06 2010 +0000 +++ b/MCP23S17.h Sun Aug 22 12:12:58 2010 +0000 @@ -9,15 +9,16 @@ #ifndef SER23K256_H #define SER23K256_H -// all register addresses assume IOVCON.BANK = 0 (POR default) +// all register addresses assume IOCON.BANK = 0 (POR default) -#define IODIRA 0x00 -#define IODIRB 0x01 -#define IOCON 0x0A -#define GPIOA 0x12 -#define GPIOB 0x13 -#define OLATA 0x14 -#define OLATB 0x15 +#define IODIRA 0x00 +#define IODIRB 0x01 +#define GPINTENA 0x02 +#define IOCON 0x0A +#define GPIOA 0x12 +#define GPIOB 0x13 +#define OLATA 0x14 +#define OLATB 0x15 // Control settings @@ -30,7 +31,7 @@ MCP23S17(SPI& spi, PinName ncs, char writeOpcode); void directionA(char direction); void directionB(char direction); - void intconA(char interruptsEnabledMask); + void gpIntEnA(char interruptsEnabledMask); char inputA(); char inputB(); void outputA(char byte);