Closed boylesg closed 6 years ago
GPRS::GPRS(HardwareSerial *pHWSerial, uint32_t baudRate): gprsSerial(60, 61) { inst = this; pHWSerial->begin(baudRate); sim900_init(pHWSerial); }
GPRS::GPRS(uint8_t tx, uint8_t rx, uint32_t baudRate): gprsSerial(tx, rx) { inst = this; gprsSerial.begin(baudRate); sim900_init(&gprsSerial); }
Stream *serialSIM900 = NULL;
void sim900_init(Stream* uart_device) { serialSIM900 = uart_device; } Are these functions really needed? Not used by any example sketches and no equivalent functions available in class HardwareSerial. void GPRS::listen(void) { gprsSerial.listen(); }
bool GPRS::isListening(void) { return gprsSerial.isListening(); }
That's good modification.
GPRS::GPRS(HardwareSerial *pHWSerial, uint32_t baudRate): gprsSerial(60, 61) { inst = this; pHWSerial->begin(baudRate); sim900_init(pHWSerial); }
GPRS::GPRS(uint8_t tx, uint8_t rx, uint32_t baudRate): gprsSerial(tx, rx) { inst = this; gprsSerial.begin(baudRate); sim900_init(&gprsSerial); }
Stream *serialSIM900 = NULL;
void sim900_init(Stream* uart_device) { serialSIM900 = uart_device; } Are these functions really needed? Not used by any example sketches and no equivalent functions available in class HardwareSerial. void GPRS::listen(void) { gprsSerial.listen(); }
bool GPRS::isListening(void) { return gprsSerial.isListening(); }