Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ In the .h file of your existing library add this lines just after the aruino.h i
#include "yourlib.h"

//here start the include
#include <../SPI/SPI.h>//this chip needs SPI
#include <SPI.h>//this chip needs SPI
#include <../gpio_expander/mcp23s17.h>
//here ends
```
Expand Down
4 changes: 4 additions & 0 deletions gpio_expander.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
#ifndef _GPIO_EXPANDER_H_
#define _GPIO_EXPANDER_H_

#ifndef NOT_AN_INTERRUPT
#define NOT_AN_INTERRUPT -1
#endif

#include <inttypes.h>
#include <Arduino.h>

Expand Down
6 changes: 3 additions & 3 deletions max6957.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
#include <Arduino.h>

#include "max6957.h"
#include <../SPI/SPI.h>//this chip needs SPI
#include <SPI.h>//this chip needs SPI

max6957::max6957(){
#if defined (SPI_HAS_TRANSACTION)
#if defined (SPI_HAS_TRANSACTION) && (MAXSPISPEED)
_spiTransactionsSpeed = MAXSPISPEED;//set to max supported speed (in relation to chip and CPU)
#else
_spiTransactionsSpeed = 0;
#endif
}

void max6957::setSPIspeed(uint32_t spispeed){
#if defined (SPI_HAS_TRANSACTION)
#if defined (SPI_HAS_TRANSACTION) && (MAXSPISPEED)
if (spispeed > 0){
if (spispeed > MAXSPISPEED) {
_spiTransactionsSpeed = MAXSPISPEED;
Expand Down
2 changes: 1 addition & 1 deletion max6957.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ XXXXX
#include <inttypes.h>

#include "gpio_expander.h"
#include <../SPI/SPI.h>//this chip needs SPI
#include <SPI.h>//this chip needs SPI

#include "_utility/SPI.parameters.h"

Expand Down
2 changes: 1 addition & 1 deletion max7301.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>

#include "max7301.h"
#include <../SPI/SPI.h>//this chip needs SPI
#include <SPI.h>//this chip needs SPI

max7301::max7301(){
#if defined (SPI_HAS_TRANSACTION)
Expand Down
2 changes: 1 addition & 1 deletion max7301.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ XXXXX
#include <inttypes.h>

#include "gpio_expander.h"
#include <../SPI/SPI.h>//this chip needs SPI
#include <SPI.h>//this chip needs SPI

#include "_utility/SPI.parameters.h"

Expand Down
2 changes: 1 addition & 1 deletion max7311.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>

#include "max7311.h"
#include <../Wire/Wire.h>//this chip uses wire
#include <Wire.h>//this chip uses wire

max7311::max7311(){

Expand Down
2 changes: 1 addition & 1 deletion max7318.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>

#include "max7318.h"
#include <../Wire/Wire.h>//this chip uses wire
#include <Wire.h>//this chip uses wire

max7318::max7318(){
}
Expand Down
2 changes: 1 addition & 1 deletion mcp23008.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>

#include "mcp23008.h"
#include <../Wire/Wire.h>//this chip uses wire
#include <Wire.h>//this chip uses wire

mcp23008::mcp23008(){

Expand Down
2 changes: 1 addition & 1 deletion mcp23016.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>

#include "mcp23016.h"
#include <../Wire/Wire.h>//this chip uses wire
#include <Wire.h>//this chip uses wire

mcp23016::mcp23016(){

Expand Down
2 changes: 1 addition & 1 deletion mcp23017.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>

#include "mcp23017.h"
#include <../Wire/Wire.h>//this chip uses wire
#include <Wire.h>//this chip uses wire

mcp23017::mcp23017(){

Expand Down
2 changes: 1 addition & 1 deletion mcp23018.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>

#include "mcp23018.h"
#include <../Wire/Wire.h>//this chip uses wire
#include <Wire.h>//this chip uses wire

mcp23018::mcp23018(){

Expand Down
2 changes: 1 addition & 1 deletion mcp23s08.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>

#include "mcp23s08.h"
#include <../SPI/SPI.h>//this chip needs SPI
#include <SPI.h>//this chip needs SPI

mcp23s08::mcp23s08(){
#if defined (SPI_HAS_TRANSACTION)
Expand Down
2 changes: 1 addition & 1 deletion mcp23s08.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ A1,A0 tied to ground = 0x20
#include <inttypes.h>

#include "gpio_expander.h"
#include <../SPI/SPI.h>//this chip needs SPI
#include <SPI.h>//this chip needs SPI

#include "_utility/SPI.parameters.h"

Expand Down
2 changes: 1 addition & 1 deletion mcp23s17.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>

#include "mcp23s17.h"
#include <../SPI/SPI.h>//this chip needs SPI
#include <SPI.h>//this chip needs SPI

mcp23s17::mcp23s17(){
#if defined (SPI_HAS_TRANSACTION)
Expand Down
2 changes: 1 addition & 1 deletion mcp23s17.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ A2,A1,A0 tied to ground = 0x20
#include <inttypes.h>

#include "gpio_expander.h"
#include <../SPI/SPI.h>//this chip needs SPI
#include <SPI.h>//this chip needs SPI

#include "_utility/SPI.parameters.h"

Expand Down
2 changes: 1 addition & 1 deletion mcp23s18.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>

#include "mcp23s18.h"
#include <../SPI/SPI.h>//this chip needs SPI
#include <SPI.h>//this chip needs SPI

mcp23s18::mcp23s18(){
#if defined (SPI_HAS_TRANSACTION)
Expand Down
2 changes: 1 addition & 1 deletion mcp23s18.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Address: 00100000 always 0x20
#include <inttypes.h>

#include "gpio_expander.h"
#include <../SPI/SPI.h>//this chip needs SPI
#include <SPI.h>//this chip needs SPI

#include "_utility/SPI.parameters.h"

Expand Down
2 changes: 1 addition & 1 deletion pca9555.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>

#include "pca9555.h"
#include <../Wire/Wire.h>//this chip uses wire
#include <Wire.h>//this chip uses wire

pca9555::pca9555(){

Expand Down
2 changes: 1 addition & 1 deletion pca9655.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>

#include "pca9655.h"
#include <../Wire/Wire.h>//this chip uses wire
#include <Wire.h>//this chip uses wire

pca9655::pca9655(){

Expand Down
2 changes: 1 addition & 1 deletion pcf8574.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>

#include "pcf8574.h"
#include <../Wire/Wire.h>//this chip uses wire
#include <Wire.h>//this chip uses wire

pcf8574::pcf8574(){

Expand Down
2 changes: 1 addition & 1 deletion pcf8574a.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>

#include "pcf8574a.h"
#include <../Wire/Wire.h>//this chip uses wire
#include <Wire.h>//this chip uses wire

pcf8574a::pcf8574a(){

Expand Down