<re_irc>
Pretty straight forward... but in rust it complains that the bytes in the array are u8 so I need to cast them by "as u32" which becomes kind of obnoxiously verbose... is there a more proper way to do this in rust or am I stuck with the "as" casts?
<re_irc>
< (@762spr:matrix.org)> I guess this applies to any kind of forming bytes from smaller types or doing bitwise operations on them in general
<re_irc>
< (@762spr:matrix.org)> Like masks and flags, etc.
<re_irc>
Very interesting! Thank you for your help!
<re_irc>
I am curious now though, what exactly the bitflags! Macro gains you? Is it just the traits and functions from bitflags crate?
<re_irc>
In other words why not just make a regular struct of flag values and use them to or together a value? It seems their examples somewhat work this way.
<re_irc>
I will dig deeper when I am not on my phone!
IlPalazzo-ojiisa has joined #rust-embedded
starblue has quit [Ping timeout: 268 seconds]
starblue has joined #rust-embedded
<re_irc>
< (@chemicstry:matrix.org)> : It implements a bunch of functions for you: operators (and/or/xor/etc) and utility functions like set/clear/is_set/etc. I assume it could be done with a trait instead of a macro with not that much extra code, but never tried
<re_irc>
< (@dirbaio:matrix.org)> : lots of breaking changes, and I didn't see anything in the newer ones I could benefit from. I didn't look very hard though. PR's welcome to update it.
<re_irc>
< (@kaspar:schleiser.de)> hi everyone, I got a question, are <16 byte structs consisting of 4 u32s, or a tuble of 4 u32, returned in registers (r0-r3), on Cortex-M?
<re_irc>
< (@kaspar:schleiser.de)> It does when going through u128: https://rust.godbolt.org/z/MrPshGY7x - and there I am again, looking at compiler output, thinking "it all happens for a reason" ...😀
vancz has quit []
vancz has joined #rust-embedded
vancz has quit [Client Quit]
vancz has joined #rust-embedded
dfgweb has joined #rust-embedded
<re_irc>
<thejpster> sounds like something the ARM EABI would define.
<re_irc>
<thejpster> Given the target is thumbv6m-none-eabi (or similar).
<re_irc>
<thejpster> Specifically, the ARM Procedure Call Standard
<re_irc>
< (@dirbaio:matrix.org)> I don't think the Rust ABI is guaranteed to follow the AAPCS. Only the C one.
DepthDeluxe has joined #rust-embedded
<re_irc>
<thejpster> Interesting!
<re_irc>
<Crylo (he/they)> wonder if anyone has had any luck running rust on the pinetime chip
<re_irc>
< (@matoushybl:matrix.org)> The smartwatch?
<re_irc>
<Crylo (he/they)> yep
<re_irc>
<Crylo (he/they)> i would have better luck saying the nRF52832
<re_irc>
< (@jamesmunns:beeper.com)> Crylo (he/they): I looked at it, but never bought one. I'm pretty sure you'd be able to get something going pretty well with embassy + embedded-graphics
<re_irc>
< (@jamesmunns:beeper.com)> IIRC, the SPI display was using something fairly standard?
<re_irc>
> ST7789 driver examples for use with the PineTime watch.
<re_irc>
<Crylo (he/they)> i should pick one up
<re_irc>
< (@jamesmunns:beeper.com)> So, the answer is has, at least :D
<re_irc>
<Crylo (he/they)> : now i want to really get one and make a basic OS for it
<re_irc>
< (@jamesmunns:beeper.com)> You might consider "embassy" a very basic OS (async scheduling, drivers, etc.), but I also won't try and convince you not to reinvent any wheels :)
<re_irc>
< (@762spr:matrix.org)> : Perfect, thanks for the explanation. I get confused sometimes with the overlap that macros can produce. Always learning! 🙃
<re_irc>
< (@wucke13:matrix.org)> If an integration test needs a temporary directory, where would it make sense to create this? Somewhere in target, or rather somewhere in whatever the current OS considers the linux equivalent of "/tmp"?
<re_irc>
< (@k900:0upti.me)> $TMPDIR?
<re_irc>
< (@wucke13:matrix.org)> Yeah, that's exactly what I was looking for. Thank you!