16-Bit I/O Expander with Serial Interface (SPI)
Fork of MCP23S17 by
Revision 4:029e24cc2b68, committed 2018-04-28
- Comitter:
- viewdeep51
- Date:
- Sat Apr 28 10:16:04 2018 +0000
- Parent:
- 3:b2a44e1e54b8
- Commit message:
- final code dated 28/04/18
Changed in this revision
MCP23S17.cpp | Show annotated file Show diff for this revision Revisions of this file |
MCP23S17.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r b2a44e1e54b8 -r 029e24cc2b68 MCP23S17.cpp --- a/MCP23S17.cpp Wed Jan 20 10:49:02 2016 +0000 +++ b/MCP23S17.cpp Sat Apr 28 10:16:04 2018 +0000 @@ -248,40 +248,6 @@ _write(GPIOB_ADDR, data); } - char MCP23S17::olata() - { - return _read(OLATA_ADDR); - } - - void MCP23S17::olata(char data) - { - _write(OLATA_ADDR, data); - } - - char MCP23S17::olatb() - { - return _read(OLATB_ADDR); - } - - void MCP23S17::olatb(char data) - { - _write(OLATB_ADDR, data); - } - - void MCP23S17::intmirror(bool mirror) - { - char kopi_iocon = _read(IOCON_ADDR); - if (mirror) - { - kopi_iocon = kopi_iocon | INTERRUPT_MIRROR_BIT; - } - else - { - kopi_iocon = kopi_iocon & ~INTERRUPT_MIRROR_BIT; - } - _write(IOCON_ADDR, kopi_iocon); - } - void MCP23S17::intpol(bool polarity) { char kopi_iocon = _read(IOCON_ADDR);
diff -r b2a44e1e54b8 -r 029e24cc2b68 MCP23S17.h --- a/MCP23S17.h Wed Jan 20 10:49:02 2016 +0000 +++ b/MCP23S17.h Sat Apr 28 10:16:04 2018 +0000 @@ -434,57 +434,6 @@ * @param data The 8 bits to write to GPIOB register. */ void gpiob(char data); - - /** Read OLATA. - * - * OUTPUT LATCH REGISTER - * The OLAT register provides access to the output latches. A read from this register results in a read of the OLAT and not the port itself. A write to this register - * modifies the output latches that modifies the pins configured as outputs. - * - * @return The 8 bits read. - */ - char olata(); - - /** Write to OLATA. - * - * OUTPUT LATCH REGISTER - * The OLAT register provides access to the output latches. A read from this register results in a read of the OLAT and not the port itself. A write to this register - * modifies the output latches that modifies the pins configured as outputs. - * - * @param data The 8 bits to write to OLATA register. - */ - void olata(char data); - - /** Read OLATB. - * - * OUTPUT LATCH REGISTER - * The OLAT register provides access to the output latches. A read from this register results in a read of the OLAT and not the port itself. A write to this register - * modifies the output latches that modifies the pins configured as outputs. - * - * @return The 8 bits read. - */ - char olatb(); - - /** Write to OLATB. - * - * OUTPUT LATCH REGISTER - * The OLAT register provides access to the output latches. A read from this register results in a read of the OLAT and not the port itself. A write to this register - * modifies the output latches that modifies the pins configured as outputs. - * - * @param data The 8 bits to write to OLATB register. - */ - void olatb(char data); - - /** Write to IOCON.MIRROR - * - * IOCON REGISTER - INTERRUPT MIRROR BIT - * 1 = The INT pins are internally connected - * 0 = The INT pins are not connected. INTA is associated with PortA and INTB is associated with PortB - * - * @param mirror write true ('1') or false ('0'). - */ - void intmirror(bool mirror); - /** Write to IOCON.INTPOL * * IOCON REGISTER - INTERRUPT POLARITY BIT