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

Added all available USART2 pins #88

Closed mcopela closed 4 years ago

mcopela commented 4 years ago

The serial file only has one set of USART2 pins under the STM32l0x1 feature flag, while the STM32l031 setting sheet lists four.

I added all the available USART2 pins and tested on my Nucleo-L031K6 evaluation board.

dbrgn commented 4 years ago

See #68, which also does this (I think), but is probably wrong as well for some devices in the STM32l0x1 family.

I'm working on a PR that fixes this for all MCUs by basing the cfg flags on the io-* features, just like #87 but for UART.

dbrgn commented 4 years ago

This should now be fixed in #68.

@mcopela testing that branch would be very welcome! It also includes an API change, where the Pins trait is replaced with RxPin and TxPin (as discussesd in #67).

arkorobotics commented 4 years ago

@dbrgn Shall we close this PR given #68 is complete/merged?

dbrgn commented 4 years ago

@arkorobotics I would say so, #68 includes the changes that were proposed here!

arkorobotics commented 4 years ago

Copy!

mcopela commented 4 years ago

Thank you guys! I'll test the new merges today