switch to milliseconds instead of micros for better readability
This commit is contained in:
@@ -185,10 +185,10 @@ result_t Device::send(symbol_t value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* the maximum duration to wait for an enhanced sequence to complete after the first part was already retrieved:
|
||||
* 2* (Start+8Bit+Stop+Extra @ 9600Bd)
|
||||
* the maximum duration in milliseconds to wait for an enhanced sequence to complete after the first part was already
|
||||
* retrieved: 2* (Start+8Bit+Stop+Extra @ 9600Bd)
|
||||
*/
|
||||
#define ENHANCED_COMPLETE_WAIT_DURATION (2*1150)
|
||||
#define ENHANCED_COMPLETE_WAIT_DURATION 3
|
||||
|
||||
|
||||
result_t Device::recv(unsigned int timeout, symbol_t* value, ArbitrationState* arbitrationState) {
|
||||
@@ -206,8 +206,8 @@ result_t Device::recv(unsigned int timeout, symbol_t* value, ArbitrationState* a
|
||||
struct timespec tdiff;
|
||||
|
||||
// set select timeout
|
||||
tdiff.tv_sec = timeout/1000000;
|
||||
tdiff.tv_nsec = (timeout%1000000)*1000;
|
||||
tdiff.tv_sec = timeout/1000;
|
||||
tdiff.tv_nsec = (timeout%1000)*1000000;
|
||||
|
||||
#ifdef HAVE_PPOLL
|
||||
nfds_t nfds = 1;
|
||||
|
||||
@@ -117,7 +117,7 @@ class Device {
|
||||
|
||||
/**
|
||||
* Get the transfer latency of this device.
|
||||
* @return the transfer latency in microseconds.
|
||||
* @return the transfer latency in milliseconds.
|
||||
*/
|
||||
virtual unsigned int getLatency() const { return m_latency; }
|
||||
|
||||
@@ -147,7 +147,7 @@ class Device {
|
||||
|
||||
/**
|
||||
* Read a single byte from the device.
|
||||
* @param timeout maximum time to wait for the byte in microseconds, or 0 for infinite.
|
||||
* @param timeout maximum time to wait for the byte in milliseconds, or 0 for infinite.
|
||||
* @param value the reference in which the received byte value is stored.
|
||||
* @param arbitrationState the reference in which the current @a ArbitrationState is stored on success. When set to
|
||||
* @a as_won, the received byte is the master address that was successfully arbitrated with.
|
||||
|
||||
Reference in New Issue
Block a user