crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
emerent is now known as Guest3207
Guest3207 has quit [Killed (calcium.libera.chat (Nickname regained by services))]
emerent has joined #rust-embedded
<jr-oss>
I tried embassy on STM32 Discovery board and had problems with usart (with parity) and clock settings. You can find my attempt to fix it on https://github.com/jr-oss/embassy/tree/stm32_fixes (3 commits). Shall I start a PR or is something missing?
<re_irc>
<lulf> jr-oss: the changes look good to me 🚀, feel free to raise a PR.
<jr-oss>
lulf: Thanks, will do
<jr-oss>
lulf: Do you prefer a force push (and a clean history) to fix formatting or just another commit
<re_irc>
<lulf> jr-oss: in this case either case works, but force push is fine.
<re_irc>
<lulf> * works IMHO,
<re_irc>
<lulf> jr-oss: also, you might want to hang out in #embassy-rs:matrix.org (https://matrix.to/#/#embassy-rs:matrix.org)
<jr-oss>
lulf: Have force pushed the changes. Sorry for not having noticed beforehand. I am not used to matrix and my first attempts always required installing a client, so I haven't look into it any further.
<re_irc>
<lulf> No worries, just thought I'd let you know it exists, it takes some time to discover all the places to hang out 😅
cr1901 has quit [Ping timeout: 240 seconds]
cr1901 has joined #rust-embedded
aspe has joined #rust-embedded
lcbit has joined #rust-embedded
<re_irc>
<ryan-summers> How does rust decide which version of a function to use when there's a name conflict? I have an external trait that defines "iter()" on a struct, but that name is identical to a primitive slice's iter() function
<re_irc>
<ryan-summers> And Rust is picking the trait impl when I want it to use the primitive function instead
<re_irc>
<ryan-summers> Huh, Rust docs indicate that the inherent method should always be called first, and you'd have to explicitly override that to treat it as a trait object to get the trait impl. I'll dive a bit deeper on what's happening here
<re_irc>
<ryan-summers> Ah very interesting. Has to do indeed with Rust's coercion order. In this case, it was a native array, which will defer to the trait object before trying to coerce into a slice and looking up functions
lcbit has quit [Quit: WeeChat 2.3]
lcbit has joined #rust-embedded
<re_irc>
<Robert Jördens> You can coerce explicitly: "x.as_slice().iter()"
<re_irc>
<ryan-summers> Yeah, you can also do x[..].iter() - just a strange oddity
<re_irc>
<ryan-summers> * "x[..].iter()"
starblue has quit [Ping timeout: 256 seconds]
starblue has joined #rust-embedded
aspe has quit [Quit: aspe]
<re_irc>
<Chris [pwnOrbitals]> Hey everyone, I’m building for stm32 and using some C code along Rust with cc. Is there any way to control how/which libc is used ? I’d like picolibc but not sure what would be the best way to do that
<re_irc>
<9names (@9names:matrix.org)> i think this will "just work" if you use you the gcc from your picolibc toolchain as your linker
fabic has joined #rust-embedded
nort has quit [Ping timeout: 246 seconds]
starblue has quit [Ping timeout: 246 seconds]
<re_irc>
<Phil Markgraf> James Munns: Is there a way to do incremental CRC calculation when receiving a COBS encoded messages? (Thinking of Postcard 1.0 features...) - It seems like this should be possible on the receive side, as you know where the zeroes are going to be, before they are received.
<re_irc>
<James Munns> Maybe, though you'd also need to do incremental cobs decoding
<re_irc>
<James Munns> at least - I'd imagine you'd need to put your CRC inside the COBS framing, since you can't guarantee the CRC doesn't have any zero bytes
nort has joined #rust-embedded
vancz has quit []
vancz has joined #rust-embedded
dc740 has quit [Remote host closed the connection]
dc740 has joined #rust-embedded
dc740 has quit [Remote host closed the connection]
dc740 has joined #rust-embedded
fabic has quit [Ping timeout: 240 seconds]
starblue has joined #rust-embedded
nort has quit [Ping timeout: 260 seconds]
<re_irc>
<Jason Qin> i want to use rust to program an arduino mega. Does embassy support avr targets?