Here iare two hal_adc APIs and underlying implementations to compare.

https://github.com/apache/incubator-mynewt-core/pull/23
https://github.com/apache/incubator-mynewt-core/pull/21

Pull21 - this uses a sysid in the hal Api and depends on a the BSP to translate 
(at runtime) to a driver structure
Pull23 - this uses the structure natively in the API.

Special Notes

Check pull requests 23 for the simple application that I wrote. The 
implementation using these two very similar APIs was very different.
Check out the implementation of the file adC (reads bytes from a file).  This 
looks a bit different when that instance tries to get its file state.





Reply via email to