Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: adc: Add Microchip MCP3914 SPI 8ch ADC driver #65646

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions drivers/adc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ zephyr_library_sources_ifdef(CONFIG_ADC_MAX11102_17 adc_max11102_17.c)
zephyr_library_sources_ifdef(CONFIG_ADC_AD5592 adc_ad5592.c)
zephyr_library_sources_ifdef(CONFIG_ADC_LTC2451 adc_ltc2451.c)
zephyr_library_sources_ifdef(CONFIG_ADC_NUMAKER adc_numaker.c)
zephyr_library_sources_ifdef(CONFIG_ADC_MCP3914 adc_mcp3914.c)
2 changes: 2 additions & 0 deletions drivers/adc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,6 @@ source "drivers/adc/Kconfig.ltc2451"

source "drivers/adc/Kconfig.numaker"

source "drivers/adc/Kconfig.mcp3914"

endif # ADC
43 changes: 43 additions & 0 deletions drivers/adc/Kconfig.mcp3914
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright 2013 EVOS Energy Pty Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# MCP3914 ADC configuration options

config ADC_MCP3914
bool "MCP3914 driver"
default y
depends on DT_HAS_MICROCHIP_MCP3914_ENABLED
select SPI
help
Enable MCP3914 ADC driver.

The MCP3914 is an 8 channel 24-bit A/D converter
with SPI interface.

if ADC_MCP3914

config ADC_MCP3914_ACQUISITION_THREAD_STACK_SIZE
int "Stack size for the ADC data acquisition thread"
default 768
help
Size of the stack used for the internal data acquisition
thread.

config ADC_MCP3914_ACQUISITION_THREAD_PRIO
int "Priority for the ADC data acquisition thread"
default -5
help
Priority level for the internal ADC data acquisition thread.

endif # ADC_MCP3914
Loading