hackndev / zinc

The bare metal stack for rust
zinc.rs
Apache License 2.0
1k stars 100 forks source link

ADC support? #413

Open bluecube opened 7 years ago

bluecube commented 7 years ago

I was looking through the repository and couldn't find any mentions about other peripherials on the MCU, specifically ADC. Is it possible to use these now? If not, how hard would it be to add it and where should I start?

jamwaffles commented 7 years ago

I added SPI to the Tiva C which wasn't too tricky. That PR might be useful as an example. Zinc doesn't have complete support for all peripherals yet, hence the various PRs about adding them. You may want to do what I did and copy a similar looking config from another peripheral that is supported by Zinc on your platform, then modify the init routines, names and stuff to work with whatever peripheral you're targeting. The datasheet will tell you how to initialise things properly.