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

update PAC from 0.10.0 to 0.13.0 #166

Closed allexoll closed 3 years ago

allexoll commented 3 years ago

there has been updates to the pac.

some fields were missing (namely in the CRC peripheral, and i'm porting the F4 CRC driver to this family, but some fields aren't present in the 0.10.0 pac.

trying to change the pac version only seems to break 2 calls to unsafe functions in the DMA driver, so that seems fixable.

What is your opinion on this?

error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
   --> /Users/allexoll/Desktop/stm32l0xx-hal/src/dma.rs:344:55
    |
344 |                       handle.dma.$chfield.par.write(|w| w.pa().bits(address));
    |                                                         ^^^^^^^^^^^^^^^^^^^^ call to unsafe function

error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
   --> /Users/allexoll/Desktop/stm32l0xx-hal/src/dma.rs:351:55
    |
351 |                       handle.dma.$chfield.mar.write(|w| w.ma().bits(address));
    |                                                         ^^^^^^^^^^^^^^^^^^^^ call to unsafe function
hannobraun commented 3 years ago

Replied in #167.

allexoll commented 3 years ago

has been adressed in #168