Sodaq_AT_Device.cpp
int Sodaq_AT_Device::timedRead(uint32_t timeout) const
{
    int c;
    uint32_t _startMillis = millis();

    do {
        c = _modemStream->read();

        if (c >= 0) {
            return c;
        }
    } while (millis() - _startMillis < timeout);

    return -1; // -1 indicates timeout
}
// Returns a character from the modem stream if read within _timeout ms or -1 otherwise.
Returns a character from the modem stream if read within _timeout ms or -1 otherwise.
Returns a character from the modem stream if read within _timeout ms or - 1 otherwise .
int Sodaq_AT_Device::timedRead(uint32_t timeout) const
{
    int c;
    uint32_t _startMillis = millis();
    do {
        c = _modemStream->read();
        if (c >= 0) {
            return c;
        }
    } while (millis() - _startMillis < timeout);
    return -1; 
}
int Sodaq_AT_Device :: timedRead ( uint32_t timeout ) const { int c ; uint32_t _startMillis = millis ( ) ; do { c = _modemStream -> read ( ) ; if ( c >= 0 ) { return c ; } } while ( millis ( ) - _startMillis < timeout ) ; return -1 ; }
Returns a character from the modem stream if read within _timeout ms or -1 otherwise.
Returns a character from the modem stream if read within _timeout ms or - 1 otherwise .
// -1 indicates timeout