Changed pin order in Module constructor
This commit is contained in:
parent
78fb945355
commit
b63d324c50
2 changed files with 6 additions and 3 deletions
|
@ -11,7 +11,7 @@ class Module {
|
||||||
public:
|
public:
|
||||||
Module(int tx, int rx);
|
Module(int tx, int rx);
|
||||||
Module(int cs, int int0, int int1, SPIClass& spi = SPI);
|
Module(int cs, int int0, int int1, SPIClass& spi = SPI);
|
||||||
Module(int cs, int rx, int tx, int int0, int int1, SPIClass& spi = SPI);
|
Module(int cs, int int0, int int1, int rx, int tx, SPIClass& spi = SPI);
|
||||||
|
|
||||||
SoftwareSerial* ModuleSerial;
|
SoftwareSerial* ModuleSerial;
|
||||||
|
|
||||||
|
@ -43,6 +43,9 @@ class Module {
|
||||||
int getCs() const { return(_cs); }
|
int getCs() const { return(_cs); }
|
||||||
int getInt0() const { return(_int0); }
|
int getInt0() const { return(_int0); }
|
||||||
int getInt1() const { return(_int1); }
|
int getInt1() const { return(_int1); }
|
||||||
|
int getRx() const { return(_rx); }
|
||||||
|
int getTx() const { return(_tx); }
|
||||||
|
SPIClass* getSpi() const { return(_spi); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int _cs;
|
int _cs;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#include "RadioLib.h"
|
#include "RadioLib.h"
|
||||||
|
|
||||||
Radio::Radio() {
|
Radio::Radio() {
|
||||||
ModuleA = new Module(RADIOSHIELD_CS_A, RADIOSHIELD_RX_A, RADIOSHIELD_TX_A, RADIOSHIELD_INT_0, RADIOSHIELD_INT_1);
|
ModuleA = new Module(RADIOSHIELD_CS_A, RADIOSHIELD_INT_0, RADIOSHIELD_INT_1, RADIOSHIELD_RX_A, RADIOSHIELD_TX_A);
|
||||||
ModuleB = new Module(RADIOSHIELD_CS_B, RADIOSHIELD_RX_B, RADIOSHIELD_TX_B, RADIOSHIELD_INT_0, RADIOSHIELD_INT_1);
|
ModuleB = new Module(RADIOSHIELD_CS_B, RADIOSHIELD_INT_0, RADIOSHIELD_INT_1, RADIOSHIELD_RX_B, RADIOSHIELD_TX_B);
|
||||||
}
|
}
|
||||||
|
|
||||||
Radio RadioShield;
|
Radio RadioShield;
|
||||||
|
|
Loading…
Add table
Reference in a new issue