ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
<cr1901> eldruin: Trying to use https://github.com/eldruin/eeprom24x-rs/tree/v0.6.1 v0.6.1 b/c I need e-hal v0.2. I've noticed that you've hardcoded the timer trait to use core::time::Duration https://github.com/eldruin/eeprom24x-rs/blob/v0.6.1/src/storage.rs#L18
<cr1901> Is there any examples on how to use eeprom24x crate with a HAL that _doesn't_ implement Countdown<Time = Duration>, or are non e-hal 1.0 versions of this crate not usable w/ such HALs?
<cr1901> Oh are you serious?! I can't even use the compat layer. I just lost the past 2 days trying to get EEPROM storage to work as a PoC, and now I can't test it on hardware. https://github.com/ryankurte/embedded-hal-compat/pull/34
<cr1901> (When I get up tomorrow, I'll see if I can implement a conversion newtype hopefully...)
bomb has joined #rust-embedded
barafael[m] has joined #rust-embedded
<barafael[m]> cr1901: I'm also using this crate. Probably the best bet is to use it with e-hal 1.0. What is holding you at 0.2?
<cr1901> barafael[m]: https://github.com/atsamd-rs/atsamd/pull/579#issuecomment-2080306870 (Going back to bed lol)
<cr1901> Basically, USB doesn't work upstream
IlPalazzo-ojiisa has joined #rust-embedded
<JamesMunns[m]> dirbaio I dunno where we'd put it, Embeddonomicon maybe? But IMO it'd be good to have an example of how you do struct transmutes right, and what can go wrong. It's lame for me to just say "don't", it's better to give docs on how to do it right instead. If you wanna collab on this next week I'm down.
AtleoS has quit [Ping timeout: 260 seconds]
AtleoS has joined #rust-embedded
AtleoS has quit [Remote host closed the connection]
AtleoS has joined #rust-embedded
bomb has quit [Quit: πŸ’£]
eldruin[m] has joined #rust-embedded
<eldruin[m]> <cr1901> "Is there any examples on how..." <- sorry about that. If you implement it for another `Time` type, I can merge it and release a 0.6.2
<eldruin[m]> (would need some kind of switching mechanism, though)
<eldruin[m]> Alternatively, you can use the normal interface instead of the embedded-storage traits
<eldruin[m]> You could also adapt the 0.7 version of the implementation, which uses delay instead of countdown
spinfast[m] has quit [Quit: Idle timeout reached: 172800s]
bpye has quit [Quit: Ping timeout (120 seconds)]
bpye has joined #rust-embedded
fuse117[m] has quit [Quit: Idle timeout reached: 172800s]
K900 has quit [Quit: Idle timeout reached: 172800s]
bomb has joined #rust-embedded
<thejpster[m]> Ffs. This guy is so good it’s actually almost upsetting.
<dygear[m]> Yeah, I saw that this morning. Excellent video. I assumed it was one of you guy who made it as it was very well done.
<bomb> his other videos are good as well
<thejpster[m]> No one I know. But then I’m not good at putting faces to screen names.
<bomb> wouldn't surprise me if he lurks in this channel :)
<IlPalazzo-ojiisa> Is that a round-about way of saying it's actually you?
<bomb> uwu I wish
therustybits[m] has joined #rust-embedded
<therustybits[m]> oh he lurks...
<therustybits[m]> me trying to read everything here i missed from the last 3 weeks πŸ’€
IlPalazzo-ojiisa has quit [Quit: Leaving.]
<bomb> ayy
<diondokter[m]> therustybits: You're doing great work! This really allows people who've done a bit of arduino to jump to Rust for more serious work. Very nice and accessible videos
<therustybits[m]> Thanks! Trying hard not to say anything disastrously wrong πŸ˜‚
<therustybits[m]> still new to the scene, but loving it
<diondokter[m]> therustybits[m]: I'd say that's a good thing! It's been quite a while since I learned Rust, so I don't fully remember anymore what I struggled with.
<diondokter[m]> Also, if you're unsure about something, you can always ask and check here
<therustybits[m]> Will do, thanks!
<JamesMunns[m]> <therustybits[m]> "oh he lurks..." <- Are you going to be at RustNL or Oxidize?
<bomb> therustybits[m] you [will] use Rust for non-embedded stuff as well?
<therustybits[m]> JamesMunns[m]: No for RustNL.. possibly Oxidize. I'm in upstate NY, so its a bit of a hike 😬
<therustybits[m]> <bomb> "therustybits you [will] use Rust..." <- Yes πŸ˜€
<dygear[m]> Oh no shit. I'm in NY but on Long Island.
<therustybits[m]> My history is in IOT stuff, so doing something where you write some firmware and then a cloud service in the same language seems like a pretty awesome story
<therustybits[m]> dygear[m]: Ha! My grandparents lived in Central Islip. Dad moved upstate in the 70s
<dygear[m]> I'm right around there. I'm a Paramedic by day and Programmer by night. So hopefully they don't need my day services as I cover the entirety of Suffolk County (for the most part).
<dygear[m]> Is it normal for data sheets to not mention what checksum formula they are using? The finger print sensor that I'm working with has a checksum at the end of their payload. But they don't say how to caclulate the checksum. Are they always just CRC32? https://cdn-shop.adafruit.com/product-files/4651/4651_R503%20fingerprint%20module%20user%20manual.pdf
bomb has quit [Quit: πŸ’£]
<JamesMunns[m]> dygear[m]: It describes it here:
* JamesMunns[m] uploaded an image: Screenshot_20240501-235010~2.png
<JamesMunns[m]> JamesMunns[m]: So u16::wrapping_add
<JamesMunns[m]> JamesMunns[m]: A real "check sum"
<dygear[m]> Oh, intresting. I didn't understand that paragraph in the table. I don't think I would have got that on my own. Thank you James.
<JamesMunns[m]> Unsure if it uses 8 or 16 bit words at a time tho
<JamesMunns[m]> I'd guess 8 but I'd probably try to logic analyzer it.
<dygear[m]> I've read the datasheet a few times now as I've been building the libary. I think they have a pre-calc'd checksum on one of the packest that I can send to the device. I'll run that though the system to see where they match.
GrantM11235[m] has joined #rust-embedded
<GrantM11235[m]> My guess is 16 bit words, otherwise the high byte would be mostly zeros
<JamesMunns[m]> GrantM11235[m]: Definitely interested in what the answer is :D
<dygear[m]> s/packest/packets/
slabity[m] has joined #rust-embedded
<slabity[m]> So I finally switched to using a proper debugger/programmer to program my RP2040 using probe-rs. Originally it was working fine, but now when I upload the program it just ends with `Finished` and nothing gets printed after that:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/UceTuHkriJmoAiyBtWrrUpgY>)
corecode[m] has joined #rust-embedded
<corecode[m]> how do you do TDD for register writes?
<cr1901> eldruin[m]: I'll keep that in mind re: PR. Right now I'm looking into making a newtype that converts to Duration from Nanoseconds