Add basic ADC support
Planning on abstracting this behind hardware setup APIs, but this works for a simple demo until then
This commit is contained in:
parent
17b3f0a89f
commit
d439778949
9 changed files with 151 additions and 0 deletions
10
includes/hardware/adc.h
Normal file
10
includes/hardware/adc.h
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#ifndef _INCLUDES_HARDWARE_ADC_H_
|
||||
#define _INCLUDES_HARDWARE_ADC_H_
|
||||
|
||||
/**
|
||||
* @brief Read the ADC value from the given channel index. See "adc-channels" in
|
||||
* your board overlay file.
|
||||
*/
|
||||
int adc_get_mv(int channel);
|
||||
|
||||
#endif /* _INCLUDES_HARDWARE_ADC_H_ */
|
||||
Loading…
Reference in a new issue