apache / apache/mynewt-core

RFC - ADC API not abstract enough.

Open
#2,273 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
891
Forks
381
Avg merge
2d 7h
Merged PRs (30d)
14

Description

Currently the ADC API lacks on device and channel configuration data structures. This led us to having drivers which work in different fashions and use different configuration data structures. It made us deal with manufacturer SDK data structures on app code and stopped us from having an adc_test app (like we do with pwm_test) which besides being example code is helpful to test the drivers during manufacturer SDK code updates.

This issue aims to find an ADC API witch abstracts as much as possible the hardware thus allowing more homogenous usage across drivers.

At this point I did a few [changes](https://github.com/mlaz/mynewt-core/tree/adc_api_changes) on the ADC API and nRF52 driver so it works with the test app.
The test app is based on the one we have on this [tutorial](https://mynewt.apache.org/latest/tutorials/sensors/nrf52_adc.html) and it can improved.

Please review and comment.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the proposed ADC API and nRF52 driver changes in the linked adc_api_changes branch, then compare the tutorial's ADC test app with the existing pwm_test app. Clarify the desired abstraction and configuration data structures through the issue discussion. Done means the API design is agreed on and supports consistent driver usage and an ADC test app.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.