示例#1
0
    inline bool wait_for(bool value, unsigned int timeout) {
        timeout += millis();

        while (echo->read_digital() != value)
            if (millis() > timeout)
                return false;

        return true;
    }