Skip to contentSkip to conversation

cmd: add ADC cli commands

PATCH New Neil Armstrong 2 participants 2 messages Apr 27, 2018 – May 9, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 cmd: add ADC cli commands

Add an 'adc' cli command to get adc devices informations and read single shots datas.

---
 cmd/Kconfig  |   8 ++++
 cmd/Makefile |   1 +
 cmd/adc.c    | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 130 insertions(+)
 create mode 100644 cmd/adc.c
cmd/Kconfig +8 -0
index bc1d2f3..495c634 100644
@@ -601,6 +601,14 @@ config CMD_ARMFLASH
 	help
 	  ARM Ltd reference designs flash partition access
 
+config CMD_ADC
+	bool "adc - Access Analog to Digital Converters info and data"
+	select ADC
+	select DM_REGULATOR
+	help
+	  Shows ADC device info and permit printing one-shot analog converted
+	  data from a named Analog to Digital Converter.
+
 config CMD_CLK
 	bool "clk - Show clock frequencies"
 	help
cmd/Makefile +1 -0
index c4269ac..4c66353 100644
@@ -14,6 +14,7 @@ obj-y += version.o
 
 # command
 obj-$(CONFIG_CMD_AES) += aes.o
+obj-$(CONFIG_CMD_ADC) += adc.o
 obj-$(CONFIG_CMD_ARMFLASH) += armflash.o
 obj-y += blk_common.o
 obj-$(CONFIG_SOURCE) += source.o
cmd/adc.c new file +121 -0

121 lines not on this page · raw message

Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 cmd: add ADC cli commands

Quoted 4 lines · Neil Armstrong

Add an 'adc' cli command to get adc devices informations and read single shots datas.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180508/5fe9ed96/attachment.sig>