Simple detection for LE910-NA1 modules
Fork of MTS-Cellular by
Diff: Cellular/Cellular.cpp
- Revision:
- 9:1a03e3f3e7fe
- Parent:
- 8:2d7259d244d1
- Child:
- 10:c188cc05aed5
diff -r 2d7259d244d1 -r 1a03e3f3e7fe Cellular/Cellular.cpp --- a/Cellular/Cellular.cpp Wed May 21 15:28:37 2014 -0500 +++ b/Cellular/Cellular.cpp Wed May 21 15:39:35 2014 -0500 @@ -15,6 +15,26 @@ return true; } +bool Cellular::configureSignals(unsigned int DCD, unsigned int DTR, unsigned int RESET) +{ + //Set DCD - The radio will raise and lower this line + if (DCD != NC) { + dcd = new DigitalIn(PinName(DCD)); + } + /* Set DTR - This line should be lowered when we want to talk to the radio and raised when we're done + * for now we will lower it in the constructor and raise it in the destructor. + */ + if (DTR != NC) { + dtr = new DigitalOut(PinName(DTR)); + dtr->write(0); + } + //Set RESET - Set the hardware reset line to the radio + if (RESET != NC) { + resetLine = new DigitalOut(PinName(RESET)); + } + return true; +} + std::string Cellular::getRegistrationNames(Registration registration) { switch(registration) {