Added overload for UART-only modules
This commit is contained in:
parent
84ec28239a
commit
d388cbeffe
2 changed files with 12 additions and 1 deletions
|
@ -1,5 +1,15 @@
|
||||||
#include "Module.h"
|
#include "Module.h"
|
||||||
|
|
||||||
|
Module::Module(int rx, int tx) {
|
||||||
|
_cs = -1;
|
||||||
|
_rx = rx;
|
||||||
|
_tx = tx;
|
||||||
|
_int0 = -1;
|
||||||
|
_int1 = -1;
|
||||||
|
|
||||||
|
ModuleSerial = new SoftwareSerial(_rx, _tx);
|
||||||
|
}
|
||||||
|
|
||||||
Module::Module(int cs, int int0, int int1) {
|
Module::Module(int cs, int int0, int int1) {
|
||||||
_cs = cs;
|
_cs = cs;
|
||||||
_rx = -1;
|
_rx = -1;
|
||||||
|
|
|
@ -9,8 +9,9 @@
|
||||||
|
|
||||||
class Module {
|
class Module {
|
||||||
public:
|
public:
|
||||||
|
Module(int tx, int rx);
|
||||||
Module(int cs, int int0, int int1);
|
Module(int cs, int int0, int int1);
|
||||||
Module(int cs, int tx, int rx, int int0, int int1);
|
Module(int cs, int rx, int tx, int int0, int int1);
|
||||||
|
|
||||||
SoftwareSerial* ModuleSerial;
|
SoftwareSerial* ModuleSerial;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue