Updated memory address #defines to avoid clashes with other libraries and f411re board defines
Diff: MCP23S17.h
- Revision:
- 2:69ce30406dc8
- Parent:
- 1:f93b811965d8
--- a/MCP23S17.h Sun Jan 29 19:11:42 2012 +0000 +++ b/MCP23S17.h Thu May 14 21:04:13 2015 +0000 @@ -29,27 +29,27 @@ // All Registers and there Address if BANK = 0 //============================================================================= -#define IODIRA 0x00 // Controls the direction of the data I/O on Port A -#define IODIRB 0x01 // Controls the direction of the data I/O on Port B -#define IPOLA 0x02 // Configure the polarity on the corresponding GPIO (Port A) -#define IPOLB 0x03 // Configure the polarity on the corresponding GPIO (Port B) -#define GPINTENA 0x04 // Controls the interrupt-on change feature for each pin for Port A -#define GPINTENB 0x05 // Controls the interrupt-on change feature for each pin for Port B -#define DEFVALA 0x06 // The default comparison value if the INTCONA is set to "1" for Port A -#define DEFVALB 0x07 // The default comparison value if the INTCONA is set to "1" for Port B -#define INTCONA 0x08 // Controls how the associated pin value is compared for the interrupt-on-change feature for Port A -#define INTCONB 0x09 // Controls how the associated pin value is compared for the interrupt-on-change feature for Port B -#define IOCON 0x0A // Contains several bits for configuring the device -#define GPPUA 0x0C // Controls the pull-up resistors for the port pins for port A -#define GPPUB 0x0D // Controls the pull-up resistors for the port pins for port B -#define INTFA 0x0E // READ ONLY // reflects the interrupt condition on port A pins of any pin that is enabled for interrupts via the GPINTEN register. -#define INTFB 0x0F // READ ONLY // reflects the interrupt condition on port B pins of any pin that is enabled for interrupts via the GPINTEN register. -#define INTCAPA 0x10 // READ ONLY // captures the GPIO port A value at the time the interrupt occurred -#define INTCAPB 0x11 // READ ONLY // captures the GPIO port B value at the time the interrupt occurred -#define GPIOA 0x12 // Reflects the value on the port A (doing write function it only read input) -#define GPIOB 0x13 // Reflects the value on the port B (doing write function it only read input) -#define OLATA 0x14 // A write to this register modifies the output latches that modifies the pins configured as outputs for Port A -#define OLATB 0x15 // A write to this register modifies the output latches that modifies the pins configured as outputs for Port B +#define MCP23S17_IODIRA 0x00 // Controls the direction of the data I/O on Port A +#define MCP23S17_IODIRB 0x01 // Controls the direction of the data I/O on Port B +#define MCP23S17_IPOLA 0x02 // Configure the polarity on the corresponding GPIO (Port A) +#define MCP23S17_IPOLB 0x03 // Configure the polarity on the corresponding GPIO (Port B) +#define MCP23S17_GPINTENA 0x04 // Controls the interrupt-on change feature for each pin for Port A +#define MCP23S17_GPINTENB 0x05 // Controls the interrupt-on change feature for each pin for Port B +#define MCP23S17_DEFVALA 0x06 // The default comparison value if the INTCONA is set to "1" for Port A +#define MCP23S17_DEFVALB 0x07 // The default comparison value if the INTCONA is set to "1" for Port B +#define MCP23S17_INTCONA 0x08 // Controls how the associated pin value is compared for the interrupt-on-change feature for Port A +#define MCP23S17_INTCONB 0x09 // Controls how the associated pin value is compared for the interrupt-on-change feature for Port B +#define MCP23S17_IOCON 0x0A // Contains several bits for configuring the device +#define MCP23S17_GPPUA 0x0C // Controls the pull-up resistors for the port pins for port A +#define MCP23S17_GPPUB 0x0D // Controls the pull-up resistors for the port pins for port B +#define MCP23S17_INTFA 0x0E // READ ONLY // reflects the interrupt condition on port A pins of any pin that is enabled for interrupts via the GPINTEN register. +#define MCP23S17_INTFB 0x0F // READ ONLY // reflects the interrupt condition on port B pins of any pin that is enabled for interrupts via the GPINTEN register. +#define MCP23S17_INTCAPA 0x10 // READ ONLY // captures the GPIO port A value at the time the interrupt occurred +#define MCP23S17_INTCAPB 0x11 // READ ONLY // captures the GPIO port B value at the time the interrupt occurred +#define MCP23S17_GPIOA 0x12 // Reflects the value on the port A (doing write function it only read input) +#define MCP23S17_GPIOB 0x13 // Reflects the value on the port B (doing write function it only read input) +#define MCP23S17_OLATA 0x14 // A write to this register modifies the output latches that modifies the pins configured as outputs for Port A +#define MCP23S17_OLATB 0x15 // A write to this register modifies the output latches that modifies the pins configured as outputs for Port B //============================================================================= // Declaration of variables & custom #defines