Arduino help wire library12/17/2023 Of course, I'm sure someone reading this is thinking "why do this atĪll, the Wire library has worked well for 10 years". Or maybe there's some better non-blocking API than event callback functions? Non-blocking if the user has set up a completion callback function? Maybe 2 more of these could be added for master mode,Īnd the traditional requestFrom and endTransmission would become The library already has onReceive(function) and onRequest(function) usedįor slave mode. Or maybe a complete function would be giving with something like: Later when the transfer completes, the function would be called. When given a function to call, requestFrom would immediately return. Wire.requestFrom(address, length, true, myfunction) Perhaps another optional parameter could beĪdded for a function to be called? Such as: The 2 blocking functions are Wire.endTransmission() and Wire.requestFrom().Įach of these currently accepts an optional parameter for whether or not We developers work together for API compatibility. I believe everyone benefits in the long term when Ideally I would like to see this adopted by the officialĪrduino Wire library. One of my many goals this year is a non-blocking extension to the Wire
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |