On Thu, Aug 30, 2018 at 11:35:44AM -0700, Vipul Rahane wrote:
> Hey,
> 
> I think that’s a really great idea. One thing I would add is that we
> definitely should honor timeouts in any of the retries. Also, a way to
> disable the retries should be a good idea. Probably making it a syscfg
> which when set to 0 does not do any retries.

Yes, the `timo` parameter should apply to each retry.  That said, I
think a timeout should only occur if there is something wrong with the
I2C bus (e.g., the problem we've seen with the nRF52:
https://github.com/apache/mynewt-core/blob/1702cdeed8d8f718ed75f40961b9b2f37bae2ff3/hw/mcu/nordic/nrf52xxx/src/hal_i2c.c#L314-L325).

> I am assuming the errors codes will be HAL_I2C_ERR_XXXX error codes,
> so all the mcus would have to return the same error codes on errors.

Yes, sounds good.

> Personally, I like calling them retries than tries since if they are
> set to 0 the operation still happens once, but that’s just me.

`retries` it is, then :).

Chris

Reply via email to