microbuilder commented on issue #1259: [WIP] TSL2591 driver w/sim stubs URL: https://github.com/apache/mynewt-core/pull/1259#issuecomment-404232219 I'm not sure at this point what the best approach is to model the I2C slave/peripheral behaviour in the simulator. I'm thinking through it now, but presumably some sort of finite state machine would be useful to handle the various read/write combinations where you first write the address of the register(s) you want, then read an appropriate number of bytes/registers back, and handle error conditions appropriately. Should this be implemented entirely in `tsl2591_sim.c`, or should a helper package be put together to make this easier to implement in other I2C simulators in the future (I have plans to write a couple more myself)??? Any suggestions on a sustainable, elegant solution to this are welcome, since it makes sense for this first simulated driver to be well written since it will serve as an example for future development.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services