nrf-rs / nrf-pacs

Peripheral Access Crates (PACs) for nRF microcontrollers
BSD Zero Clause License
27 stars 13 forks source link

Patch SVD file for all tasks and events #3

Open jamesmunns opened 5 years ago

jamesmunns commented 5 years ago

Currently it is annoying to use the unsafe bits() function when writing to tasks or clearing events.

I think the best way to approach this is to patch the SVD for any field with the name task_ or event_. Since for all these fields the behavior is consistent, we could probably get pretty far with a simple regex replace.

CC @sajattack @hannobraun

hannobraun commented 5 years ago

I'm fine with this.

Does anyone have experience with upstreaming such changes to Nordic?

jamesmunns commented 5 years ago

Maybe we could ping @terjesc?

dvdsk commented 3 years ago

I needed such a patch to get the ADC working on the 52832 and made a python script to patch the sdv here https://github.com/dskleingeld/nrf52832-pac/blob/master/fix_svd.py