stm32-rs / stm32l4xx-hal

A Hardware abstraction layer for the stm32l432xx series chips written in rust.
156 stars 103 forks source link

Add I2C `AddressingMode`. #326

Open reitermarkus opened 1 year ago

reitermarkus commented 1 year ago

This doesn't actually do anything useful at the moment since all functions that accept an address are only u8, but makes the code a bit more readable.

It took me quite a while to figure out why my code was working with the STM32 C HAL but not in Rust: The C HAL expects the address to already be shifted while this is done internally in the Rust HAL.