You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think we were expecting setTxBufferSize and availableForWrite() to be reporting on a single "TX buffer size", and not that one was "ADDING" to the hardware buffer in reports.
I think there is an argument that says that the setTxBufferSize is buggy or at the least, confusing.
Certainly setTxBufferSize(N) does nothing if N<128. Which seems reasonable. and makes one expect that (say)
setTxBufferSize(200) would set a total size of 200.. not 328 as it does.
It also means its impossible to set a (total size) buffer of (say) 200! as setTxBufferSize(72) will be rejected.
Its very complex and I have been getting lost in this.. but does that make sense?
Considering that IDF driver (mandatory for our Arduino implementation) only allows to set an additional Tx (or Rx) Buffer when its size is over 128 bytes, which is the HW TX FIFO size:
setTxBufferSize(tx_size) would behave in this way:
if tx_size is lower than 128, it will do nothing and return 128, as the size set.
if tx_size is higher than 128, it will set, internally, the IDF Driver buffer with size = tx_size - 128. It will return tx_size as the size set.
availableForWrite() will return the total available space, including the HW TX FIFO space of 128 bytes.
The text was updated successfully, but these errors were encountered:
I think we were expecting setTxBufferSize and availableForWrite() to be reporting on a single "TX buffer size", and not that one was "ADDING" to the hardware buffer in reports.
I think there is an argument that says that the setTxBufferSize is buggy or at the least, confusing.
Certainly setTxBufferSize(N) does nothing if N<128. Which seems reasonable. and makes one expect that (say)
setTxBufferSize(200) would set a total size of 200.. not 328 as it does.
It also means its impossible to set a (total size) buffer of (say) 200! as setTxBufferSize(72) will be rejected.
Its very complex and I have been getting lost in this.. but does that make sense?
Originally posted by @dagnall53 in #6998 (comment)
Potential Solution:
Considering that IDF driver (mandatory for our Arduino implementation) only allows to set an additional Tx (or Rx) Buffer when its size is over 128 bytes, which is the HW TX FIFO size:
setTxBufferSize(tx_size) would behave in this way:
if tx_size is lower than 128, it will do nothing and return 128, as the size set.
if tx_size is higher than 128, it will set, internally, the IDF Driver buffer with size = tx_size - 128. It will return tx_size as the size set.
availableForWrite() will return the total available space, including the HW TX FIFO space of 128 bytes.
The text was updated successfully, but these errors were encountered: