mirror of
https://github.com/apache/nuttx.git
synced 2026-09-13 06:00:17 +00:00
Add a NuttX ADC lower-half for the Ameba SoC family, wired for the amebadplus/pke8721daf as /dev/adc0. The driver uses the fwlib ROM API and drives on-demand polled conversions via ADC_ReceiveBuf with the hardware auto channel-switch FIFO, because amebadplus disables the ADC software-trigger path. Per-chip wiring (channel count, pinmux function id, APB clock bits, optional aux clock) lives in a chip header so a new IC only supplies its own values without touching the shared driver. Reports raw conversion codes per the NuttX convention (12-bit effective, 0..~3876 for 0..3.3V), consistent with the STM32/i.MXRT/ Tiva ADC drivers. Verified on hardware: 0V->121, 3.3V->3876 on CH0(PB19) while CH1(PB18) held steady, confirming sampling, full-scale and multi-channel switch-list isolation. Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn> Assisted-by: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| boards/pke8721daf | ||
| index.rst | ||