Set timeout according to parameter
This commit is contained in:
parent
10d4d42c7e
commit
22c93557fd
2 changed files with 2 additions and 0 deletions
|
@ -4,4 +4,5 @@
|
|||
I2CCommunicator::I2CCommunicator(TwoWire &w_out, int slaveAddr, int timeout, __SIZE_TYPE__ bufferSize) : StreamCommunicator(w_out, bufferSize)
|
||||
{
|
||||
w_out.begin(slaveAddr);
|
||||
w_out.setTimeout(timeout);
|
||||
}
|
|
@ -4,4 +4,5 @@
|
|||
SerialCommunicator::SerialCommunicator(HardwareSerial &p_out, int baudRate, int timeout, __SIZE_TYPE__ bufferSize) : StreamCommunicator(p_out, bufferSize)
|
||||
{
|
||||
p_out.begin(baudRate);
|
||||
p_out.setTimeout(timeout);
|
||||
}
|
Reference in a new issue