duskmoon314 / aw-pac

Peripheral access API for Allwinner SoCs generated from unofficial SVD file
Apache License 2.0
25 stars 8 forks source link

feat(d1-pac): add partial coverage for D1 audio_codec fields #14

Closed antoinevg closed 2 years ago

antoinevg commented 2 years ago

This PR adds fields for the following registers of the D1's AUDIO_CODEC peripheral:

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

duskmoon314 commented 2 years ago

Great job! Thanks!

LGTM at first glance. I will review this ASAP.

duskmoon314 commented 2 years ago

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
antoinevg commented 2 years ago

Done! :-)