Closed milesgranger closed 2 years ago
If you need Word=u16, you'd have to add support for that in l4xx-hal.
You probably don't really need it though. With word=u8 you can do everything. if you want to send a u16, send 2 bytes instead, with .to_be_bytes()
or .to_le_bytes()
depending on the endianness needed.
Okay, thanks. This was my impression, that within that macro, adding a parameter for the type (u8
, u16
) for the implementation of FullDuplex<$type_>
but the statement gave me pause that perhaps there was another standard way of getting the same result.
Appreciate your help.
Hi there :wave:
I'm just getting started with embedded Rust, and I see it is common (standard?) to mention the following statement for FullDuplex trait:
In stm32l4xx-hal the word is
u8
.While attempting to write an driver (SPI) for ISM43362 (pg. 18-19), the word is required to be
u16
and I'm struggling to figure out how to support both/change to u16 for transfer operations. Are there existing examples or some hints someone can direct me towards? :pray:Sorry if this is a terribly noob question. :smile: