Daniel Egger

Results 547 comments of Daniel Egger

Looks good to me. Any objections @ryankurte?

> You destruct the driver to get back the I2C handle and pass that to the other driver Sure, but that's quite useless. > You use a RefCell That is...

@japaric I tried the `RefCell` approach and it works great (at least in my limited testing). I'll submit a PR for review later.

And also let's not forget that it's quite common to need additional resources instead of just the bus itself. For I2C (and to a lesser extend) SPI there're often separate...

@japaric I'll give your idea a spin. > The NSS / NCS / interrupt pin can be permanently stored in the State struct; no need to move them out --...

@japaric This puts quite a few additional requirements on each individual driver without explicitly defining what they are. I would rather prefer a solution that requires the driver HAL implementation...

@japaric Just to float another idea: How about a generic proxy driver? The proxy would be initialised with some peripheral it would own, e.g. the initialised I2C bus and then...

@japaric Well, the idea of the proxy is that only the proxy needs to be concerned with the locking of the multiplexed resources instead of each individual user of the...

I'm giving up. I sunk the better part of 2 days into it but I cannot get it to work due to the freakiness of Rust around mutable sharing. Things...

@Rahix This looks fantastic. I definitely have to play with that. Just curious: Any reason why you didn't stick it in it's own library crate for easier reuse? Note to...