<AugustoRoman[m]>
What's the scoop with memory alignment in rust? If I declare something like let mut buf = [0u8; 8];, is that guaranteed to be aligned to an 8-byte boundary?
<AugustoRoman[m]>
* What's the scoop with memory alignment in rust? If I declare something like let mut buf = \[0u8; 8\];, is that guaranteed to be aligned to an 8-byte boundary?
<AugustoRoman[m]>
* What's the scoop with memory alignment in rust? If I declare something like let mut buf = [0u8; 8]; , is that guaranteed to be aligned to an 8-byte boundary?
<M9names[m]>
nope, that will have the alignment of the element type (1 byte)
<AugustoRoman[m]>
Is there a simpler way to align a specific value or is defining a type the way to go?
<M9names[m]>
defining a type is the way to go. you can use the aligned crate if you're feeling lazy.
<AugustoRoman[m]>
thanks!
crabbedhaloablut has quit [Quit: bye]
crabbedhaloablut has joined #rust-embedded
vivian[m] has joined #rust-embedded
<vivian[m]>
Anyone know what the status is for risc-v for the pico 2 in the rpi-hal, I came across this PR that's been open for a while: https://github.com/rp-rs/rp-hal/pull/847 but not much else
dngrs[m] has joined #rust-embedded
<dngrs[m]>
<vivian[m]> "Anyone know what the status is..." <- you can also try asking in the #rp-rs:matrix.org room
AlexandrosLiarok has quit [Quit: Idle timeout reached: 172800s]
cinemaSundays has joined #rust-embedded
ac1dg[m] has joined #rust-embedded
<ac1dg[m]>
Hi everyone, I am struggling with LIN mode on STM32MP135F's USART1. According to the reference guide, I have to set the LINEN bit in the USART_CR2 register. I am quite new to Rust and embedded Linux in general. Can someone help me to get LIN mode to work?
starblue has quit [Ping timeout: 252 seconds]
ZachHeylmun[m] has quit [Quit: Idle timeout reached: 172800s]