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
xnor has quit [Ping timeout: 252 seconds]
xnor has joined #rust-embedded
DominicFischer[m has quit [Quit: Idle timeout reached: 172800s]
WSalmon has quit [Quit: No Ping reply in 180 seconds.]
WSalmon has joined #rust-embedded
starblue has quit [Ping timeout: 260 seconds]
starblue has joined #rust-embedded
<i509vcb[m]> wassasin pull request is here for the proposal: https://github.com/rust-embedded/embedded-hal/pull/649
<i509vcb[m]> I hacked up a "blinky using postcard over usb" example as well with the new embedded_hal_async::digital::OutputPin trait.
<i509vcb[m]> James Munns if you want to see it "hacked together in 2 hours" https://github.com/i509VCB/postcard-gpio-test/tree/master (I want to do something different here than having to declare each endpoint manually, but thats a different topic than the new traits)
<i509vcb[m]> I was curious and scope to it. With the overhead of usb transport I was getting a blink period (on then off) of 2.007 seconds (7ms overhead from USB).
<i509vcb[m]> * from USB per blink).
<i509vcb[m]> * curious and connected scope to, * from USB per blink).
<i509vcb[m]> The host in question is a Linux PC so 7ms isn't an unrealistic amount of time
_whitelogger_ has joined #rust-embedded
_whitelogger has quit [Ping timeout: 260 seconds]
WSalmon has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<thejpster[m]> ok fine, I shaved the yak
<thejpster[m]> I'm pretty sure this is exactly what core::ptr::addr_of_mut! was designed for, but opinions on general sound-ness welcome.
<dirbaio[m]> yeah that is sound afaik
<dirbaio[m]> i'm amused at your insistence of using structs for layout though :D
<dirbaio[m]> s/of/in/
<danielb[m]> <dirbaio[m]> "i'm amused at your insistence of..." <- yeah that's going to be fun to use when the registers are striped like CONF0, CONF1, CTRL0, CTRL1
ivche has joined #rust-embedded
<thejpster[m]> <dirbaio[m]> "i'm amused at your insistence of..." <- blame literally every SoC vendor. I'm starting with things like https://raw.githubusercontent.com/zephyrproject-rtos/hal_stm32/04ccc7798343ff51509c5d5276e3bce4375f50e6/stm32cube/stm32mp1xx/soc/stm32mp151axx_ca7.h
<thejpster[m]> (not that ship, that's just a public example I found)
<dirbaio[m]> yea but I mean, you also have the addressoffsets
<dirbaio[m]> so instead of doing `&raw mut (*self.ptr).control }` you can do `self.ptr.add(16)`
<dirbaio[m]> s/addressoffsets/address offsets/
<thejpster[m]> ST have been relatively kind here. Other vendors don't always do that.
<thejpster[m]> plus you could just write a macro to generate all the functions from a struct definition
<thejpster[m]> I don't know what syntax you'd use to derive the functions from ... a table of field names, types and offsets?
<dirbaio[m]> yaml 🙈
<dirbaio[m]> hahaha yeah I know that's not what you're looking for
<dirbaio[m]> many times PDFs only give you address offsets though
starblue has quit [Quit: WeeChat 3.8]
<thejpster[m]> we can perhaps agree that it's useful to give people choices
<thejpster[m]> and that people bouncing off embedded Rust because they don't want to learn YAML is a bad thing
<dirbaio[m]> lol! definitely
<thejpster[m]> s/ship/chip/
<thejpster[m]> TASKING just bought LDRA.
<JamesMunns[m]> TASKING seems to be a company that makes a tricore compiler, LDRA seems to be a company that does software validation tooling?
<thejpster[m]> Not only, but yes. Big players in the embedded space.
<bogdan[m]> <thejpster[m]> "ok fine, I shaved the yak..." <- Does `rust fn read_data(&mut self) -> u32` _need_ `&mut`, or is it just a typo? Is it an _aliasing_ thing?
<bogdan[m]> s/rust//
<thejpster[m]> &self is probably fine for reads?
<thejpster[m]> These handles aren’t singletons - they are just unsafe to create.
<thejpster[m]> I do listen to dirbaio, sometimes! lol
<thejpster[m]> So you can race on a modify call if you make two of them, even though each has ‘exclusive’ access. Unsure if I should just make modify take & self or not.
cinemaSundays has joined #rust-embedded
cinemaSundays has quit [Quit: Connection closed for inactivity]