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
Socke has quit [Ping timeout: 268 seconds]
Socke has joined #rust-embedded
IlPalazzo-ojiisa has quit [Quit: Leaving.]
<cr1901> It's not finished yet, and it's UDP
<cr1901> One port is used for request/response, plus a generic "could not handle request error" that's a unit struct. The intended idea is if you get a generic RequestError, then client consults port+1 to have the server consult a hashmap to get detailed error information for the client
<cr1901> I don't use the seq_no field at all, and src ports are ephemeral so a request is uniquely identified by (src_ip, handler_key, dst_ip, dst_port) tuple (and a second request with that same tuple with overwrite detailed error info for the previous one)
ello has quit [Ping timeout: 268 seconds]
ello has joined #rust-embedded
BogdanOlar[m] has joined #rust-embedded
<BogdanOlar[m]> Hello all! I'm thinking of writing a HAL for an EFM32 controller I have lying around. Can anyone recommend a HAL crate which implements embedded-hal 1.0?
haobogu[m] has joined #rust-embedded
<haobogu[m]> <JamesMunns[m]> "then like:..." <- > <@jamesmunns:beeper.com> then like:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/xxYMhDzXqEeuwVVWDRjcNdnE>)
TimHilt[m]1 has joined #rust-embedded
<TimHilt[m]1> Is 3 wire SPI implemented in embedded-hal? I’m not too deep into the ecosystem and a quick google search unfortunately didn’t yield anything useful
<TimHilt[m]1> Ah, I found this issue https://github.com/rust-embedded/embedded-hal/issues/144 I think that means, that it’s not supported just yet…?
<JamesMunns[m]> <haobogu[m]> "> <@jamesmunns:beeper.com..." <- When you put it in an enum, the enum variant is put on the wire first.
michaeldesilva[m has quit [Quit: Idle timeout reached: 172800s]
michaeldesilva[m has joined #rust-embedded
<michaeldesilva[m> <JamesMunns[m]> "I'm also working on postcard-..." <- Hmm, it's not obvious to me in this example,
<michaeldesilva[m> > <@jamesmunns:beeper.com> I'm also working on `postcard-rpc`, if you are specifically doing it so you can send a bunch of different commands/requests to a device, and to know what type it will respond with... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/TdDyljOrlXtsqzMWuDRgevCT>)
<JamesMunns[m]> Length prefix
<JamesMunns[m]> 4 is the length of the byte slice and 5 is the length of the str
<michaeldesilva[m> JamesMunns[m]: I'm slow hahaha
<michaeldesilva[m> thanks
<michaeldesilva[m> Top of my head, say you want to fetch the Nth element in the buffer it will need to read N length “indexes” right?
<michaeldesilva[m> * “indexes” right? Or as the buffer it created, create a lookup that has index: length offset in say a HashMap.
<michaeldesilva[m> * “indexes” right? Or as the buffer is created, create a lookup that has index: length offset in say a HashMap.
<michaeldesilva[m> * “indexes” right? Or as the buffer is created, create a lookup that has index: length offset in say a HashMap. I haven’t had time to read the library source yet (been busy with other stuff)
<JamesMunns[m]> Are you asking about Postcard? It doesn't give you "query-like" abilities - you do the deserialization, then it is a hashmap.
IlPalazzo-ojiisa has joined #rust-embedded
Henk[m] has quit [Quit: Idle timeout reached: 172800s]
mrtazz has quit [Quit: Leaving.]
SunClonus has quit [Read error: Connection reset by peer]
<michaeldesilva[m> <JamesMunns[m]> "Are you asking about Postcard..." <- Ah got it.
<michaeldesilva[m> * got it. Yeah I saw it desers like Serde back to a struct etc.
<michaeldesilva[m> I want to do this, and I don't mind going unsafe and passing a ptr... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/jbXSaLbdkUTJdmWzAmWsupYm>)
<michaeldesilva[m> * I want to do this, and I don't mind going unsafe and passing a ptr... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/FaUzHvIeMiyqyjVuQzitkGFs>)
korken89[m] has quit [Quit: Idle timeout reached: 172800s]
<JamesMunns[m]> "I don't mind this is unsafe": what you're doing is undefined behavior and the compiler is allowed to punch you and steal your lunch money at any time (including only on odd numbered days if it feels like it).
<JamesMunns[m]> You probably want to destructure the parts of the Peripheral struct so you can hand out different pieces to different constructors.
adamgreig[m] has joined #rust-embedded
<adamgreig[m]> yea, the best thing is to give owned/mut-ref individual items out of the peripherals struct, don't actually pass the whole struct into the function
<adamgreig[m]> i made a macro to help with this sort of thing https://crates.io/crates/assign-resources
jessebraham[m] has joined #rust-embedded
<jessebraham[m]> adamgreig[m]: Oh that’s pretty neat, thanks for sharing!
IlPalazzo-ojiisa has quit [Read error: Connection reset by peer]
kenny has joined #rust-embedded
IlPalazzo-ojiisa has joined #rust-embedded
crabbedhaloablut has quit []
crabbedhaloablut has joined #rust-embedded
juliand[m] has quit [Quit: Idle timeout reached: 172800s]
IlPalazzo-ojiisa has quit [Quit: Leaving.]
Ranhir has joined #rust-embedded
SunClonus has joined #rust-embedded
SunClonus has quit [Quit: Leaving]
SunClonus has joined #rust-embedded
SunClonusX has joined #rust-embedded
SunClonusX has quit [Client Quit]
SunClonus has quit [Ping timeout: 240 seconds]
thejpster[m] has joined #rust-embedded
<thejpster[m]> <BogdanOlar[m]> "Hello all! I'm thinking of..." <- You could try the reverse dependency list on crates.io?
<BogdanOlar[m]> Thanks! I ended up picking stm32f4xx-hal for inspiration, since it seems to implement both versions of embedded-hal.
<diondokter[m]> Arg! Why build an abstraction layer and then not document what any of the abstractions are supposed to be and do!?
<diondokter[m]> Looking at you Nordic!
jcroisant has quit [Quit: Connection closed for inactivity]