Skip to content

Commit

Permalink
drivers: adc: adc-shell: Add support for ADS111x ADCs to adc-shell.c
Browse files Browse the repository at this point in the history
The adc-shell uses a hardcoded list of defines to check whether it
should throwa compile-time error. The ADS1119 and ADS1112 driver both
support the APIs needed by the shell, so this commit enables support for
them in the hardcoded support list.

Signed-off-by: Jordan Montgomery <jordan.montgomery@getcruise.com>
  • Loading branch information
jmontgomery-cruise committed Apr 25, 2023
1 parent e6928d0 commit fd99dfb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions drivers/adc/adc_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
#define DT_DRV_COMPAT st_stm32_adc
#elif DT_HAS_COMPAT_STATUS_OKAY(nuvoton_npcx_adc)
#define DT_DRV_COMPAT nuvoton_npcx_adc
#elif DT_HAS_COMPAT_STATUS_OKAY(ti_ads1112)
#define DT_DRV_COMPAT ti_ads1112
#elif DT_HAS_COMPAT_STATUS_OKAY(ti_ads1119)
#define DT_DRV_COMPAT ti_ads1119
#elif DT_HAS_COMPAT_STATUS_OKAY(ti_cc32xx_adc)
#define DT_DRV_COMPAT ti_cc32xx_adc
#elif DT_HAS_COMPAT_STATUS_OKAY(raspberrypi_pico_adc)
Expand Down
2 changes: 1 addition & 1 deletion dts/bindings/adc/ti,ads1112.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ include: [adc-controller.yaml, i2c-device.yaml]

properties:
"#io-channel-cells":
const: 1
const: 1

0 comments on commit fd99dfb

Please sign in to comment.