ToddG

Results 30 comments of ToddG

I spent a few days [studying rust macros](https://github.com/ToddG/learn-electronics/tree/master/posts/hello-world/12-rust-macros), and I have some specific questions: 1. https://github.com/Rahix/avr-hal/blob/0c6cf1675c2724354f1adeaeee69992acd371e80/avr-hal-generic/src/i2c.rs#L181 Q: What is this form doing? It looks like an attribute macro wrapped in...

Rahix, thank you for all this great feedback and suggestions! I'll spend the next day or two chewing through this.

Cool! I'll check it out today.

Additional question: I have read up on PhantomData [here](https://doc.rust-lang.org/core/marker/struct.PhantomData.html) and [here](https://doc.rust-lang.org/nomicon/phantom-data.html), but I'm still curious how it is being used here: https://github.com/Rahix/avr-hal/blob/9f9d6972e4ac7c149e2644bbc52c47cca81838f4/avr-hal-generic/src/i2c.rs#L208 * Why is there a phantomdata marked type...

Regarding the CLOCK phantom... yeah, I've been playing around with how it's used and re-reading the docs, etc. I think I understand it now. Thx!

Ok, I'm getting close. I've encapsulated the data sheet status codes in a series of state transitions. I need some feedback regarding the client experience/api? You mentioned signaling/polling an atomic...

@Rahix Somehow I missed your last message. My apologies for taking 6 days to respond. Yes, I was getting concerned about orthogonal changes drifting into this PR, too. Sure thing,...

@Rahix Ok, so I've added some triggers and helper methods based on your suggestions [here](https://github.com/Rahix/avr-hal/issues/75). Couple of thoughts... * A fully fleshed example using the `I2C Master API` would really...

Ok, I'll back that static stuff out and examine the I2C driver in awesome embedded rust and see how that's implemented and used and then go from there.

Ok, so this example doesn't compile yet, but this is my take on the API for the `i2c slave`: ```rust #![no_std] #![no_main] use arduino_uno::prelude::*; use panic_halt as _; #[arduino_uno::entry] fn...