stm32-rs / stm32l0xx-hal

A hardware abstraction layer (HAL) for the STM32L0 series microcontrollers written in Rust
BSD Zero Clause License
96 stars 60 forks source link

Allow pin modes OpenDrain and PushPull for SPI output pins #226

Closed osannolik closed 1 year ago

osannolik commented 1 year ago

I needed to use OpenDrain mode for SPI output pins, but the init for SPI were only defined for pins set to Analog (i.e. implicitly PushPull). Therefore I added Output<OpenDrain> as an alternative and also Output<PushPull> to allow for more explicit user peripheral setup code.