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 throw
a 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 May 11, 2023
1 parent 2137071 commit 41208d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/adc/Kconfig.ads1112
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# ADS1X1X ADC configuration options

# Copyright (c) 2023 Cruise, LLC.
# SPDX-License-Identifier: Apache-2.0
config ADC_ADS1112
bool "Texas instruments ADS1112 I2C"
depends on DT_HAS_TI_ADS1112_ENABLED
Expand Down
4 changes: 4 additions & 0 deletions drivers/adc/adc_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,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

0 comments on commit 41208d8

Please sign in to comment.