Closed antoinevg closed 2 years ago
Great job! Thanks!
LGTM at first glance. I will review this ASAP.
I have put a .svdfmt.yaml
file in the /svd
to determine the format of the svd file. I'm sorry that there is currently no description of this in the project.
Could you format the svd file via svdtools
and then regenerate rust codes?
# cargo install svdtools
svdtools convert svd/d1_unofficial.svd svd/d1_unofficial.svd --format-config svd/.svdfmt.yaml
Done! :-)
This PR adds fields for the following registers of the D1's
AUDIO_CODEC
peripheral:ac_dac_dpc
power
ac_dac_fifoc
ac_dac_fifos
ac_dac_dg
dac
ramp
hp2
dac_vol_ctrl
It doesn't include the rest of the peripherals registers but coverage is sufficient for getting audio output up and running.
Example code: https://github.com/antoinevg/hello-d1/blob/main/src/audio_codec.rs