Add configuration logic for the SAMV7 DAC module

This commit is contained in:
Gregory Nutt 2016-08-15 08:21:46 -06:00
parent 053aea552f
commit c367e4985f
2 changed files with 36 additions and 1 deletions

View File

@ -196,6 +196,10 @@ config SAMV7_HAVE_MCAN1
bool
default n
config SAMV7_DAC
bool
default n
config SAMV7_HAVE_DAC1
bool
default n
@ -334,10 +338,12 @@ config SAMV7_MCAN1
config SAMV7_DAC0
bool "Digital To Analog Converter 0 (DAC0)"
default n
select SAMV7_DAC
config SAMV7_DAC1
bool "Digital To Analog Converter 1 (DAC1)"
default n
select SAMV7_DAC
depends on SAMV7_HAVE_DAC1
config SAMV7_EBI
@ -1657,6 +1663,35 @@ config SAMV7_TC_REGDEBUG
endmenu # Timer/counter Configuration
endif # SAMV7_HAVE_TC
menu "DAC device driver configuration"
depends on SAMV7_DAC
config SAMV7_DAC_PRESCAL
int "DAC MCK prescaler"
---help---
Define PRESCALER (Peripheral Clock to DAC Clock Ratio)
config SAMV7_DAC_TRIGGER
bool "DAC trigger mode"
default n
---help---
Enable DAC trigger mode
config SAMV7_DAC_TRIGGER_FREQUENCY
int "DAC trigger frequency"
---help---
Define DAC trigger frequency
config SAMV7_DAC_TRIGGER_SELECT
int "DAC trigger source"
default 1
range 1 3
---help---
Define DAC trigger source (only support for TC0, TC1, TC2 output is
currently implemented)
endmenu # DAC device driver configuration
menu "HSMCI device driver options"
depends on SAMV7_HSMCI

View File

@ -215,6 +215,6 @@ ifeq ($(CONFIG_SAMV7_PROGMEM),y)
CHIP_CSRCS += sam_progmem.c
endif
ifneq (,$(findstring y,$(CONFIG_SAMV7_DAC0) $(CONFIG_SAMV7_DAC1)))
ifeq ($(CONFIG_SAMV7_DAC),y)
CHIP_CSRCS += sam_dac.c
endif