parent
7a94a66b74
commit
b2244f9083
Binary file not shown.
|
|
@ -30,302 +30,319 @@
|
|||
<EraseKey />
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data>
|
||||
<options>
|
||||
<option id="common.boards" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<option id="common.services.basic.sleepmgr" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<option id="common.services.usb.class.device" value="Add" config="cdc_stdio" content-id="Atmel.ASF" />
|
||||
<option id="sam0.drivers.port" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<option id="sam0.drivers.sercom.usart" value="Add" config="callback" content-id="Atmel.ASF" />
|
||||
<option id="sam0.drivers.system" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<option id="thirdparty.os.freertos.version" value="Add" config="10.0.0" content-id="Atmel.ASF" />
|
||||
<option id="common.services.usb.class.cdc.device.example" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<option id="common.utils" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<option id="sam0.utils.cmsis.samd21.source.template" value="Add" config="" content-id="Atmel.ASF" />
|
||||
</options>
|
||||
<configurations>
|
||||
<configuration key="config.common.services.usb.class.device" value="cdc_stdio" default="cdc" content-id="Atmel.ASF" />
|
||||
<configuration key="config.sam0.drivers.extint" value="callback" default="callback" content-id="Atmel.ASF" />
|
||||
<configuration key="config.thirdparty.os.freertos-10_0_0.memory_manager" value="1_static_allocation" default="1_static_allocation" content-id="Atmel.ASF" />
|
||||
</configurations>
|
||||
<files>
|
||||
<file path="src/ASF/common/boards/board.h" framework="" version="" source="common/boards/board.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/sleepmgr/samd/sleepmgr.c" framework="" version="" source="common/services/sleepmgr/samd/sleepmgr.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/sleepmgr/samd/sleepmgr.h" framework="" version="" source="common/services/sleepmgr/samd/sleepmgr.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/sleepmgr/sleepmgr.h" framework="" version="" source="common/services/sleepmgr/sleepmgr.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="atmel_devices_cdc.cat" framework="" version="" source="common/services/usb/class/cdc/device/atmel_devices_cdc.cat" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="atmel_devices_cdc.inf" framework="" version="" source="common/services/usb/class/cdc/device/atmel_devices_cdc.inf" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/config/conf_usb.h" framework="" version="" source="common/services/usb/class/cdc/device/example/conf_usb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/main.c" framework="" version="" source="common/services/usb/class/cdc/device/example/main.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/main.h" framework="" version="" source="common/services/usb/class/cdc/device/example/main.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/config/conf_board.h" framework="" version="" source="common/services/usb/class/cdc/device/example/samd21j18a_samd21_xplained_pro/conf_board.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/config/conf_clocks.h" framework="" version="" source="common/services/usb/class/cdc/device/example/samd21j18a_samd21_xplained_pro/conf_clocks.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/config/conf_example.h" framework="" version="" source="common/services/usb/class/cdc/device/example/samd21j18a_samd21_xplained_pro/conf_example.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/config/conf_extint.h" framework="" version="" source="common/services/usb/class/cdc/device/example/samd21j18a_samd21_xplained_pro/conf_extint.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/config/conf_sleepmgr.h" framework="" version="" source="common/services/usb/class/cdc/device/example/samd21j18a_samd21_xplained_pro/conf_sleepmgr.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/class/cdc/device/example/samd21j18a_samd21_xplained_pro/ui.c" framework="" version="" source="common/services/usb/class/cdc/device/example/samd21j18a_samd21_xplained_pro/ui.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/uart.h" framework="" version="" source="common/services/usb/class/cdc/device/example/uart.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/uart_samd.c" framework="" version="" source="common/services/usb/class/cdc/device/example/uart_samd.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ui.h" framework="" version="" source="common/services/usb/class/cdc/device/example/ui.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/class/cdc/device/udi_cdc.c" framework="" version="" source="common/services/usb/class/cdc/device/udi_cdc.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/class/cdc/device/udi_cdc.h" framework="" version="" source="common/services/usb/class/cdc/device/udi_cdc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/class/cdc/device/udi_cdc_conf.h" framework="" version="" source="common/services/usb/class/cdc/device/udi_cdc_conf.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/class/cdc/device/udi_cdc_desc.c" framework="" version="" source="common/services/usb/class/cdc/device/udi_cdc_desc.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/class/cdc/usb_protocol_cdc.h" framework="" version="" source="common/services/usb/class/cdc/usb_protocol_cdc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/udc/udc.c" framework="" version="" source="common/services/usb/udc/udc.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/udc/udc.h" framework="" version="" source="common/services/usb/udc/udc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/udc/udc_desc.h" framework="" version="" source="common/services/usb/udc/udc_desc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/udc/udd.h" framework="" version="" source="common/services/usb/udc/udd.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/udc/udi.h" framework="" version="" source="common/services/usb/udc/udi.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/usb_atmel.h" framework="" version="" source="common/services/usb/usb_atmel.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/usb_protocol.h" framework="" version="" source="common/services/usb/usb_protocol.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/utils/interrupt.h" framework="" version="" source="common/utils/interrupt.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/utils/interrupt/interrupt_sam_nvic.c" framework="" version="" source="common/utils/interrupt/interrupt_sam_nvic.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/utils/interrupt/interrupt_sam_nvic.h" framework="" version="" source="common/utils/interrupt/interrupt_sam_nvic.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/utils/parts.h" framework="" version="" source="common/utils/parts.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/boards/samd21_xplained_pro/board_init.c" framework="" version="" source="sam0/boards/samd21_xplained_pro/board_init.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/boards/samd21_xplained_pro/samd21_xplained_pro.h" framework="" version="" source="sam0/boards/samd21_xplained_pro/samd21_xplained_pro.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/extint/extint.h" framework="" version="" source="sam0/drivers/extint/extint.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/extint/extint_callback.c" framework="" version="" source="sam0/drivers/extint/extint_callback.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/extint/extint_callback.h" framework="" version="" source="sam0/drivers/extint/extint_callback.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/extint/extint_sam_d_r_h/extint.c" framework="" version="" source="sam0/drivers/extint/extint_sam_d_r_h/extint.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/port/port.c" framework="" version="" source="sam0/drivers/port/port.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/port/port.h" framework="" version="" source="sam0/drivers/port/port.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/port/quick_start/qs_port_basic.h" framework="" version="" source="sam0/drivers/port/quick_start/qs_port_basic.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/sercom.c" framework="" version="" source="sam0/drivers/sercom/sercom.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/sercom.h" framework="" version="" source="sam0/drivers/sercom/sercom.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/sercom_interrupt.c" framework="" version="" source="sam0/drivers/sercom/sercom_interrupt.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/sercom_interrupt.h" framework="" version="" source="sam0/drivers/sercom/sercom_interrupt.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/sercom_pinout.h" framework="" version="" source="sam0/drivers/sercom/sercom_pinout.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/quick_start/qs_usart_basic_use.h" framework="" version="" source="sam0/drivers/sercom/usart/quick_start/qs_usart_basic_use.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/quick_start_callback/qs_usart_callback.h" framework="" version="" source="sam0/drivers/sercom/usart/quick_start_callback/qs_usart_callback.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/quick_start_dma/qs_usart_dma_use.h" framework="" version="" source="sam0/drivers/sercom/usart/quick_start_dma/qs_usart_dma_use.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/quick_start_lin/qs_lin.h" framework="" version="" source="sam0/drivers/sercom/usart/quick_start_lin/qs_lin.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/usart.c" framework="" version="" source="sam0/drivers/sercom/usart/usart.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/usart.h" framework="" version="" source="sam0/drivers/sercom/usart/usart.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/usart_interrupt.c" framework="" version="" source="sam0/drivers/sercom/usart/usart_interrupt.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/usart_interrupt.h" framework="" version="" source="sam0/drivers/sercom/usart/usart_interrupt.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/clock/clock.h" framework="" version="" source="sam0/drivers/system/clock/clock.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/clock/clock_samd21_r21_da_ha1/clock.c" framework="" version="" source="sam0/drivers/system/clock/clock_samd21_r21_da_ha1/clock.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/clock/clock_samd21_r21_da_ha1/clock_config_check.h" framework="" version="" source="sam0/drivers/system/clock/clock_samd21_r21_da_ha1/clock_config_check.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/clock/clock_samd21_r21_da_ha1/clock_feature.h" framework="" version="" source="sam0/drivers/system/clock/clock_samd21_r21_da_ha1/clock_feature.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/clock/clock_samd21_r21_da_ha1/gclk.c" framework="" version="" source="sam0/drivers/system/clock/clock_samd21_r21_da_ha1/gclk.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/clock/gclk.h" framework="" version="" source="sam0/drivers/system/clock/gclk.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/interrupt/system_interrupt.c" framework="" version="" source="sam0/drivers/system/interrupt/system_interrupt.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/interrupt/system_interrupt.h" framework="" version="" source="sam0/drivers/system/interrupt/system_interrupt.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/interrupt/system_interrupt_samd21/system_interrupt_features.h" framework="" version="" source="sam0/drivers/system/interrupt/system_interrupt_samd21/system_interrupt_features.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/pinmux/pinmux.c" framework="" version="" source="sam0/drivers/system/pinmux/pinmux.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/pinmux/pinmux.h" framework="" version="" source="sam0/drivers/system/pinmux/pinmux.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/pinmux/quick_start/qs_pinmux_basic.h" framework="" version="" source="sam0/drivers/system/pinmux/quick_start/qs_pinmux_basic.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/power/power_sam_d_r_h/power.h" framework="" version="" source="sam0/drivers/system/power/power_sam_d_r_h/power.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/reset/reset_sam_d_r_h/reset.h" framework="" version="" source="sam0/drivers/system/reset/reset_sam_d_r_h/reset.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/system.c" framework="" version="" source="sam0/drivers/system/system.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/system.h" framework="" version="" source="sam0/drivers/system/system.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/usb/stack_interface/usb_device_udd.c" framework="" version="" source="sam0/drivers/usb/stack_interface/usb_device_udd.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/usb/stack_interface/usb_dual.c" framework="" version="" source="sam0/drivers/usb/stack_interface/usb_dual.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/usb/stack_interface/usb_dual.h" framework="" version="" source="sam0/drivers/usb/stack_interface/usb_dual.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/usb/usb.h" framework="" version="" source="sam0/drivers/usb/usb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/usb/usb_sam_d_r/usb.c" framework="" version="" source="sam0/drivers/usb/usb_sam_d_r/usb.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/ac.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/ac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/adc.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/adc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/dac.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/dac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/dmac.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/dmac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/dsu.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/dsu.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/eic.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/eic.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/evsys.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/evsys.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/evsys_variant_d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/evsys_variant_d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/gclk.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/gclk.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/hmatrixb.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/hmatrixb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/i2s.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/i2s.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/mtb.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/mtb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/nvmctrl.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/nvmctrl.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/nvmctrl_variant_d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/nvmctrl_variant_d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/pac.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/pac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/pm.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/pm.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/pm_variant_d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/pm_variant_d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/port.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/port.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/rtc.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/rtc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/sercom.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/sercom.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/sysctrl.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/sysctrl.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/tc.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/tc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/tcc.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/tcc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/tcc_lighting.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/tcc_lighting.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/tcc_variant_d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/tcc_variant_d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/usb.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/usb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/wdt.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/wdt.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/ac.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/ac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/ac1.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/ac1.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/adc.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/adc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/dac.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/dac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/dmac.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/dmac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/dsu.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/dsu.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/eic.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/eic.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/evsys.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/evsys.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/evsys_variant_d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/evsys_variant_d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/gclk.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/gclk.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/i2s.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/i2s.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/mtb.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/mtb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/nvmctrl.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/nvmctrl.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/nvmctrl_variant_d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/nvmctrl_variant_d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/pac0.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/pac0.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/pac1.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/pac1.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/pac2.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/pac2.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/pm.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/pm.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/port.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/port.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/port_variant_d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/port_variant_d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/rtc.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/rtc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sbmatrix.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sbmatrix.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sercom0.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sercom0.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sercom1.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sercom1.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sercom2.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sercom2.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sercom3.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sercom3.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sercom4.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sercom4.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sercom5.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sercom5.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sysctrl.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sysctrl.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tc3.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tc3.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tc4.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tc4.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tc5.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tc5.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tc6.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tc6.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tc7.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tc7.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tcc0.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tcc0.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tcc1.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tcc1.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tcc2.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tcc2.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tcc3.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tcc3.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/usb.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/usb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/wdt.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/wdt.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e15a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e15a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e15b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e15b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e15bu.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e15bu.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e15l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e15l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e16a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e16a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e16b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e16b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e16bu.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e16bu.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e16l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e16l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e17a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e17a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e17d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e17d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e17du.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e17du.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e17l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e17l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e18a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e18a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g15a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g15a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g15b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g15b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g15l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g15l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g16a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g16a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g16b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g16b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g16l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g16l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g17a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g17a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g17au.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g17au.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g17d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g17d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g17l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g17l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g18a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g18a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g18au.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g18au.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21j15a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21j15a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21j15b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21j15b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21j16a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21j16a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21j16b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21j16b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21j17a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21j17a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21j17d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21j17d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21j18a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21j18a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e15a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e15a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e15b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e15b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e15bu.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e15bu.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e15l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e15l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e16a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e16a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e16b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e16b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e16bu.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e16bu.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e16l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e16l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e17a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e17a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e17d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e17d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e17du.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e17du.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e17l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e17l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e18a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e18a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g15a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g15a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g15b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g15b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g15l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g15l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g16a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g16a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g16b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g16b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g16l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g16l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g17a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g17a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g17au.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g17au.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g17d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g17d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g17l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g17l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g18a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g18a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g18au.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g18au.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21j15a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21j15a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21j15b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21j15b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21j16a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21j16a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21j16b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21j16b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21j17a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21j17a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21j17d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21j17d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21j18a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21j18a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/source/gcc/startup_samd21.c" framework="" version="" source="sam0/utils/cmsis/samd21/source/gcc/startup_samd21.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/source/system_samd21.c" framework="" version="" source="sam0/utils/cmsis/samd21/source/system_samd21.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/source/system_samd21.h" framework="" version="" source="sam0/utils/cmsis/samd21/source/system_samd21.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/compiler.h" framework="" version="" source="sam0/utils/compiler.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/header_files/io.h" framework="" version="" source="sam0/utils/header_files/io.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/linker_scripts/samd21/gcc/samd21j18a_flash.ld" framework="" version="" source="sam0/utils/linker_scripts/samd21/gcc/samd21j18a_flash.ld" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/make/Makefile.sam.in" framework="" version="" source="sam0/utils/make/Makefile.sam.in" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/preprocessor/mrecursion.h" framework="" version="" source="sam0/utils/preprocessor/mrecursion.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/preprocessor/mrepeat.h" framework="" version="" source="sam0/utils/preprocessor/mrepeat.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/preprocessor/preprocessor.h" framework="" version="" source="sam0/utils/preprocessor/preprocessor.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/preprocessor/stringz.h" framework="" version="" source="sam0/utils/preprocessor/stringz.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/preprocessor/tpaste.h" framework="" version="" source="sam0/utils/preprocessor/tpaste.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/status_codes.h" framework="" version="" source="sam0/utils/status_codes.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/syscalls/gcc/syscalls.c" framework="" version="" source="sam0/utils/syscalls/gcc/syscalls.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/ATMEL-disclaimer.txt" framework="" version="" source="thirdparty/CMSIS/ATMEL-disclaimer.txt" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/CMSIS_END_USER_LICENCE_AGREEMENT.pdf" framework="" version="" source="thirdparty/CMSIS/CMSIS_END_USER_LICENCE_AGREEMENT.pdf" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Include/arm_math.h" framework="" version="" source="thirdparty/CMSIS/Include/arm_math.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Include/cmsis_compiler.h" framework="" version="" source="thirdparty/CMSIS/Include/cmsis_compiler.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Include/cmsis_gcc.h" framework="" version="" source="thirdparty/CMSIS/Include/cmsis_gcc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Include/cmsis_version.h" framework="" version="" source="thirdparty/CMSIS/Include/cmsis_version.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Include/core_cm0plus.h" framework="" version="" source="thirdparty/CMSIS/Include/core_cm0plus.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Include/mpu_armv7.h" framework="" version="" source="thirdparty/CMSIS/Include/mpu_armv7.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Lib/GCC/libarm_cortexM0l_math.a" framework="" version="" source="thirdparty/CMSIS/Lib/GCC/libarm_cortexM0l_math.a" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Lib/license.txt" framework="" version="" source="thirdparty/CMSIS/Lib/license.txt" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/README.txt" framework="" version="" source="thirdparty/CMSIS/README.txt" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/license.txt" framework="" version="" source="thirdparty/CMSIS/license.txt" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/utils/stdio/stdio_usb/stdio_usb.c" framework="" version="3.49.1" source="common\utils\stdio\stdio_usb\stdio_usb.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/utils/stdio/stdio_usb/stdio_usb.h" framework="" version="3.49.1" source="common\utils\stdio\stdio_usb\stdio_usb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/stdio/read.c" framework="" version="3.49.1" source="sam0\utils\stdio\read.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/stdio/write.c" framework="" version="3.49.1" source="sam0\utils\stdio\write.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/queue.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\queue.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/tasks.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\tasks.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/event_groups.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\event_groups.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/croutine.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\croutine.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/stream_buffer.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\stream_buffer.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/timers.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\timers.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/list.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\list.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/readme.txt" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\readme.txt" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/readme.txt" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\readme.txt" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/projdefs.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\projdefs.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/list.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\list.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/queue.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\queue.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/StackMacros.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\StackMacros.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/timers.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\timers.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/portable.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\portable.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/stack_macros.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\stack_macros.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/event_groups.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\event_groups.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/FreeRTOS.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\FreeRTOS.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/mpu_wrappers.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\mpu_wrappers.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/stream_buffer.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\stream_buffer.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/task.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\task.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/semphr.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\semphr.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/message_buffer.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\message_buffer.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/croutine.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\croutine.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/deprecated_definitions.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\deprecated_definitions.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/Config/FreeRTOSConfig.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\module_config\FreeRTOSConfig.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/readme.txt" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\portable\readme.txt" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/GCC/ARM_CM0/port.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\portable\GCC\ARM_CM0\port.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/GCC/ARM_CM0/portmacro.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\portable\GCC\ARM_CM0\portmacro.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/MemMang/heap_1.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\portable\MemMang\heap_1.c" changed="False" content-id="Atmel.ASF" />
|
||||
</files>
|
||||
<documentation help="https://asf.microchip.com/docs/3.49.1/common.services.usb.class.cdc.device.example.samd21_xpro/html/index.html" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.49.1" />
|
||||
</dependencies>
|
||||
<project id="common.services.usb.class.cdc.device.example.samd21_xpro" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<board id="board.samd21_xplained_pro" value="Add" config="" content-id="Atmel.ASF" />
|
||||
</framework-data>
|
||||
<options>
|
||||
<option id="common.boards" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<option id="common.services.basic.sleepmgr" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<option id="common.services.usb.class.device" value="Add" config="cdc_stdio" content-id="Atmel.ASF" />
|
||||
<option id="sam0.drivers.port" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<option id="sam0.drivers.sercom.usart" value="Add" config="callback" content-id="Atmel.ASF" />
|
||||
<option id="sam0.drivers.system" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<option id="thirdparty.os.freertos.version" value="Add" config="10.0.0" content-id="Atmel.ASF" />
|
||||
<option id="sam0.drivers.dac" value="Add" config="callback" content-id="Atmel.ASF" />
|
||||
<option id="sam0.drivers.adc" value="Add" config="callback" content-id="Atmel.ASF" />
|
||||
<option id="common2.services.delay" value="Add" config="systick" content-id="Atmel.ASF" />
|
||||
<option id="common.utils.interrupt" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<option id="common.services.usb.class.cdc.device.example" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<option id="common.utils" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<option id="sam0.utils.cmsis.samd21.source.template" value="Add" config="" content-id="Atmel.ASF" />
|
||||
</options>
|
||||
<configurations>
|
||||
<configuration key="config.common.services.usb.class.device" value="cdc_stdio" default="cdc" content-id="Atmel.ASF" />
|
||||
<configuration key="config.sam0.drivers.extint" value="callback" default="callback" content-id="Atmel.ASF" />
|
||||
<configuration key="config.thirdparty.os.freertos-10_0_0.memory_manager" value="1_static_allocation" default="1_static_allocation" content-id="Atmel.ASF" />
|
||||
</configurations>
|
||||
<files>
|
||||
<file path="src/ASF/common/boards/board.h" framework="" version="" source="common/boards/board.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/sleepmgr/samd/sleepmgr.c" framework="" version="" source="common/services/sleepmgr/samd/sleepmgr.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/sleepmgr/samd/sleepmgr.h" framework="" version="" source="common/services/sleepmgr/samd/sleepmgr.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/sleepmgr/sleepmgr.h" framework="" version="" source="common/services/sleepmgr/sleepmgr.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="atmel_devices_cdc.cat" framework="" version="" source="common/services/usb/class/cdc/device/atmel_devices_cdc.cat" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="atmel_devices_cdc.inf" framework="" version="" source="common/services/usb/class/cdc/device/atmel_devices_cdc.inf" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/config/conf_usb.h" framework="" version="" source="common/services/usb/class/cdc/device/example/conf_usb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/main.c" framework="" version="" source="common/services/usb/class/cdc/device/example/main.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/main.h" framework="" version="" source="common/services/usb/class/cdc/device/example/main.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/config/conf_board.h" framework="" version="" source="common/services/usb/class/cdc/device/example/samd21j18a_samd21_xplained_pro/conf_board.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/config/conf_clocks.h" framework="" version="" source="common/services/usb/class/cdc/device/example/samd21j18a_samd21_xplained_pro/conf_clocks.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/config/conf_example.h" framework="" version="" source="common/services/usb/class/cdc/device/example/samd21j18a_samd21_xplained_pro/conf_example.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/config/conf_extint.h" framework="" version="" source="common/services/usb/class/cdc/device/example/samd21j18a_samd21_xplained_pro/conf_extint.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/config/conf_sleepmgr.h" framework="" version="" source="common/services/usb/class/cdc/device/example/samd21j18a_samd21_xplained_pro/conf_sleepmgr.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/class/cdc/device/example/samd21j18a_samd21_xplained_pro/ui.c" framework="" version="" source="common/services/usb/class/cdc/device/example/samd21j18a_samd21_xplained_pro/ui.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/uart.h" framework="" version="" source="common/services/usb/class/cdc/device/example/uart.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/uart_samd.c" framework="" version="" source="common/services/usb/class/cdc/device/example/uart_samd.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ui.h" framework="" version="" source="common/services/usb/class/cdc/device/example/ui.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/class/cdc/device/udi_cdc.c" framework="" version="" source="common/services/usb/class/cdc/device/udi_cdc.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/class/cdc/device/udi_cdc.h" framework="" version="" source="common/services/usb/class/cdc/device/udi_cdc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/class/cdc/device/udi_cdc_conf.h" framework="" version="" source="common/services/usb/class/cdc/device/udi_cdc_conf.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/class/cdc/device/udi_cdc_desc.c" framework="" version="" source="common/services/usb/class/cdc/device/udi_cdc_desc.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/class/cdc/usb_protocol_cdc.h" framework="" version="" source="common/services/usb/class/cdc/usb_protocol_cdc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/udc/udc.c" framework="" version="" source="common/services/usb/udc/udc.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/udc/udc.h" framework="" version="" source="common/services/usb/udc/udc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/udc/udc_desc.h" framework="" version="" source="common/services/usb/udc/udc_desc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/udc/udd.h" framework="" version="" source="common/services/usb/udc/udd.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/udc/udi.h" framework="" version="" source="common/services/usb/udc/udi.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/usb_atmel.h" framework="" version="" source="common/services/usb/usb_atmel.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/services/usb/usb_protocol.h" framework="" version="" source="common/services/usb/usb_protocol.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/utils/interrupt.h" framework="" version="" source="common/utils/interrupt.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/utils/interrupt/interrupt_sam_nvic.c" framework="" version="" source="common/utils/interrupt/interrupt_sam_nvic.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/utils/interrupt/interrupt_sam_nvic.h" framework="" version="" source="common/utils/interrupt/interrupt_sam_nvic.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/utils/parts.h" framework="" version="" source="common/utils/parts.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/boards/samd21_xplained_pro/board_init.c" framework="" version="" source="sam0/boards/samd21_xplained_pro/board_init.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/boards/samd21_xplained_pro/samd21_xplained_pro.h" framework="" version="" source="sam0/boards/samd21_xplained_pro/samd21_xplained_pro.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/extint/extint.h" framework="" version="" source="sam0/drivers/extint/extint.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/extint/extint_callback.c" framework="" version="" source="sam0/drivers/extint/extint_callback.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/extint/extint_callback.h" framework="" version="" source="sam0/drivers/extint/extint_callback.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/extint/extint_sam_d_r_h/extint.c" framework="" version="" source="sam0/drivers/extint/extint_sam_d_r_h/extint.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/port/port.c" framework="" version="" source="sam0/drivers/port/port.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/port/port.h" framework="" version="" source="sam0/drivers/port/port.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/port/quick_start/qs_port_basic.h" framework="" version="" source="sam0/drivers/port/quick_start/qs_port_basic.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/sercom.c" framework="" version="" source="sam0/drivers/sercom/sercom.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/sercom.h" framework="" version="" source="sam0/drivers/sercom/sercom.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/sercom_interrupt.c" framework="" version="" source="sam0/drivers/sercom/sercom_interrupt.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/sercom_interrupt.h" framework="" version="" source="sam0/drivers/sercom/sercom_interrupt.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/sercom_pinout.h" framework="" version="" source="sam0/drivers/sercom/sercom_pinout.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/quick_start/qs_usart_basic_use.h" framework="" version="" source="sam0/drivers/sercom/usart/quick_start/qs_usart_basic_use.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/quick_start_callback/qs_usart_callback.h" framework="" version="" source="sam0/drivers/sercom/usart/quick_start_callback/qs_usart_callback.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/quick_start_dma/qs_usart_dma_use.h" framework="" version="" source="sam0/drivers/sercom/usart/quick_start_dma/qs_usart_dma_use.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/quick_start_lin/qs_lin.h" framework="" version="" source="sam0/drivers/sercom/usart/quick_start_lin/qs_lin.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/usart.c" framework="" version="" source="sam0/drivers/sercom/usart/usart.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/usart.h" framework="" version="" source="sam0/drivers/sercom/usart/usart.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/usart_interrupt.c" framework="" version="" source="sam0/drivers/sercom/usart/usart_interrupt.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/sercom/usart/usart_interrupt.h" framework="" version="" source="sam0/drivers/sercom/usart/usart_interrupt.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/clock/clock.h" framework="" version="" source="sam0/drivers/system/clock/clock.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/clock/clock_samd21_r21_da_ha1/clock.c" framework="" version="" source="sam0/drivers/system/clock/clock_samd21_r21_da_ha1/clock.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/clock/clock_samd21_r21_da_ha1/clock_config_check.h" framework="" version="" source="sam0/drivers/system/clock/clock_samd21_r21_da_ha1/clock_config_check.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/clock/clock_samd21_r21_da_ha1/clock_feature.h" framework="" version="" source="sam0/drivers/system/clock/clock_samd21_r21_da_ha1/clock_feature.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/clock/clock_samd21_r21_da_ha1/gclk.c" framework="" version="" source="sam0/drivers/system/clock/clock_samd21_r21_da_ha1/gclk.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/clock/gclk.h" framework="" version="" source="sam0/drivers/system/clock/gclk.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/interrupt/system_interrupt.c" framework="" version="" source="sam0/drivers/system/interrupt/system_interrupt.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/interrupt/system_interrupt.h" framework="" version="" source="sam0/drivers/system/interrupt/system_interrupt.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/interrupt/system_interrupt_samd21/system_interrupt_features.h" framework="" version="" source="sam0/drivers/system/interrupt/system_interrupt_samd21/system_interrupt_features.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/pinmux/pinmux.c" framework="" version="" source="sam0/drivers/system/pinmux/pinmux.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/pinmux/pinmux.h" framework="" version="" source="sam0/drivers/system/pinmux/pinmux.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/pinmux/quick_start/qs_pinmux_basic.h" framework="" version="" source="sam0/drivers/system/pinmux/quick_start/qs_pinmux_basic.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/power/power_sam_d_r_h/power.h" framework="" version="" source="sam0/drivers/system/power/power_sam_d_r_h/power.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/reset/reset_sam_d_r_h/reset.h" framework="" version="" source="sam0/drivers/system/reset/reset_sam_d_r_h/reset.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/system.c" framework="" version="" source="sam0/drivers/system/system.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/system/system.h" framework="" version="" source="sam0/drivers/system/system.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/usb/stack_interface/usb_device_udd.c" framework="" version="" source="sam0/drivers/usb/stack_interface/usb_device_udd.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/usb/stack_interface/usb_dual.c" framework="" version="" source="sam0/drivers/usb/stack_interface/usb_dual.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/usb/stack_interface/usb_dual.h" framework="" version="" source="sam0/drivers/usb/stack_interface/usb_dual.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/usb/usb.h" framework="" version="" source="sam0/drivers/usb/usb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/usb/usb_sam_d_r/usb.c" framework="" version="" source="sam0/drivers/usb/usb_sam_d_r/usb.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/ac.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/ac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/adc.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/adc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/dac.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/dac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/dmac.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/dmac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/dsu.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/dsu.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/eic.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/eic.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/evsys.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/evsys.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/evsys_variant_d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/evsys_variant_d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/gclk.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/gclk.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/hmatrixb.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/hmatrixb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/i2s.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/i2s.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/mtb.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/mtb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/nvmctrl.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/nvmctrl.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/nvmctrl_variant_d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/nvmctrl_variant_d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/pac.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/pac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/pm.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/pm.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/pm_variant_d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/pm_variant_d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/port.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/port.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/rtc.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/rtc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/sercom.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/sercom.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/sysctrl.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/sysctrl.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/tc.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/tc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/tcc.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/tcc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/tcc_lighting.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/tcc_lighting.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/tcc_variant_d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/tcc_variant_d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/usb.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/usb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/component/wdt.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/component/wdt.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/ac.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/ac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/ac1.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/ac1.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/adc.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/adc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/dac.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/dac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/dmac.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/dmac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/dsu.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/dsu.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/eic.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/eic.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/evsys.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/evsys.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/evsys_variant_d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/evsys_variant_d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/gclk.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/gclk.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/i2s.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/i2s.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/mtb.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/mtb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/nvmctrl.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/nvmctrl.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/nvmctrl_variant_d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/nvmctrl_variant_d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/pac0.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/pac0.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/pac1.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/pac1.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/pac2.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/pac2.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/pm.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/pm.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/port.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/port.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/port_variant_d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/port_variant_d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/rtc.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/rtc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sbmatrix.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sbmatrix.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sercom0.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sercom0.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sercom1.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sercom1.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sercom2.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sercom2.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sercom3.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sercom3.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sercom4.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sercom4.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sercom5.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sercom5.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/sysctrl.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/sysctrl.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tc3.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tc3.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tc4.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tc4.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tc5.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tc5.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tc6.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tc6.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tc7.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tc7.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tcc0.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tcc0.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tcc1.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tcc1.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tcc2.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tcc2.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/tcc3.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/tcc3.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/usb.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/usb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/instance/wdt.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/instance/wdt.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e15a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e15a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e15b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e15b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e15bu.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e15bu.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e15l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e15l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e16a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e16a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e16b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e16b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e16bu.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e16bu.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e16l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e16l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e17a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e17a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e17d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e17d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e17du.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e17du.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e17l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e17l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21e18a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21e18a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g15a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g15a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g15b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g15b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g15l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g15l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g16a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g16a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g16b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g16b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g16l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g16l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g17a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g17a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g17au.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g17au.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g17d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g17d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g17l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g17l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g18a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g18a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21g18au.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21g18au.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21j15a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21j15a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21j15b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21j15b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21j16a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21j16a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21j16b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21j16b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21j17a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21j17a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21j17d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21j17d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/pio/samd21j18a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/pio/samd21j18a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e15a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e15a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e15b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e15b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e15bu.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e15bu.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e15l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e15l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e16a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e16a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e16b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e16b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e16bu.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e16bu.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e16l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e16l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e17a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e17a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e17d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e17d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e17du.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e17du.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e17l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e17l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21e18a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21e18a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g15a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g15a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g15b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g15b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g15l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g15l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g16a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g16a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g16b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g16b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g16l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g16l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g17a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g17a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g17au.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g17au.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g17d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g17d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g17l.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g17l.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g18a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g18a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21g18au.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21g18au.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21j15a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21j15a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21j15b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21j15b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21j16a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21j16a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21j16b.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21j16b.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21j17a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21j17a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21j17d.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21j17d.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/include/samd21j18a.h" framework="" version="" source="sam0/utils/cmsis/samd21/include/samd21j18a.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/source/gcc/startup_samd21.c" framework="" version="" source="sam0/utils/cmsis/samd21/source/gcc/startup_samd21.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/source/system_samd21.c" framework="" version="" source="sam0/utils/cmsis/samd21/source/system_samd21.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/cmsis/samd21/source/system_samd21.h" framework="" version="" source="sam0/utils/cmsis/samd21/source/system_samd21.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/compiler.h" framework="" version="" source="sam0/utils/compiler.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/header_files/io.h" framework="" version="" source="sam0/utils/header_files/io.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/linker_scripts/samd21/gcc/samd21j18a_flash.ld" framework="" version="" source="sam0/utils/linker_scripts/samd21/gcc/samd21j18a_flash.ld" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/make/Makefile.sam.in" framework="" version="" source="sam0/utils/make/Makefile.sam.in" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/preprocessor/mrecursion.h" framework="" version="" source="sam0/utils/preprocessor/mrecursion.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/preprocessor/mrepeat.h" framework="" version="" source="sam0/utils/preprocessor/mrepeat.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/preprocessor/preprocessor.h" framework="" version="" source="sam0/utils/preprocessor/preprocessor.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/preprocessor/stringz.h" framework="" version="" source="sam0/utils/preprocessor/stringz.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/preprocessor/tpaste.h" framework="" version="" source="sam0/utils/preprocessor/tpaste.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/status_codes.h" framework="" version="" source="sam0/utils/status_codes.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/syscalls/gcc/syscalls.c" framework="" version="" source="sam0/utils/syscalls/gcc/syscalls.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/ATMEL-disclaimer.txt" framework="" version="" source="thirdparty/CMSIS/ATMEL-disclaimer.txt" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/CMSIS_END_USER_LICENCE_AGREEMENT.pdf" framework="" version="" source="thirdparty/CMSIS/CMSIS_END_USER_LICENCE_AGREEMENT.pdf" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Include/arm_math.h" framework="" version="" source="thirdparty/CMSIS/Include/arm_math.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Include/cmsis_compiler.h" framework="" version="" source="thirdparty/CMSIS/Include/cmsis_compiler.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Include/cmsis_gcc.h" framework="" version="" source="thirdparty/CMSIS/Include/cmsis_gcc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Include/cmsis_version.h" framework="" version="" source="thirdparty/CMSIS/Include/cmsis_version.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Include/core_cm0plus.h" framework="" version="" source="thirdparty/CMSIS/Include/core_cm0plus.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Include/mpu_armv7.h" framework="" version="" source="thirdparty/CMSIS/Include/mpu_armv7.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Lib/GCC/libarm_cortexM0l_math.a" framework="" version="" source="thirdparty/CMSIS/Lib/GCC/libarm_cortexM0l_math.a" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/Lib/license.txt" framework="" version="" source="thirdparty/CMSIS/Lib/license.txt" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/README.txt" framework="" version="" source="thirdparty/CMSIS/README.txt" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/CMSIS/license.txt" framework="" version="" source="thirdparty/CMSIS/license.txt" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/utils/stdio/stdio_usb/stdio_usb.c" framework="" version="3.49.1" source="common\utils\stdio\stdio_usb\stdio_usb.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common/utils/stdio/stdio_usb/stdio_usb.h" framework="" version="3.49.1" source="common\utils\stdio\stdio_usb\stdio_usb.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/stdio/read.c" framework="" version="3.49.1" source="sam0\utils\stdio\read.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/utils/stdio/write.c" framework="" version="3.49.1" source="sam0\utils\stdio\write.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/queue.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\queue.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/tasks.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\tasks.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/event_groups.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\event_groups.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/croutine.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\croutine.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/stream_buffer.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\stream_buffer.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/timers.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\timers.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/list.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\list.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/readme.txt" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\readme.txt" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/readme.txt" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\readme.txt" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/projdefs.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\projdefs.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/list.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\list.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/queue.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\queue.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/StackMacros.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\StackMacros.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/timers.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\timers.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/portable.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\portable.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/stack_macros.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\stack_macros.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/event_groups.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\event_groups.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/FreeRTOS.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\FreeRTOS.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/mpu_wrappers.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\mpu_wrappers.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/stream_buffer.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\stream_buffer.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/task.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\task.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/semphr.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\semphr.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/message_buffer.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\message_buffer.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/croutine.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\croutine.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include/deprecated_definitions.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\include\deprecated_definitions.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/Config/FreeRTOSConfig.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\module_config\FreeRTOSConfig.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/readme.txt" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\portable\readme.txt" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/GCC/ARM_CM0/port.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\portable\GCC\ARM_CM0\port.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/GCC/ARM_CM0/portmacro.h" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\portable\GCC\ARM_CM0\portmacro.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/MemMang/heap_1.c" framework="" version="3.49.1" source="thirdparty\freertos\freertos-10.0.0\Source\portable\MemMang\heap_1.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common2/services/delay/sam0/systick_counter.c" framework="" version="3.49.1" source="common2\services\delay\sam0\systick_counter.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common2/services/delay/delay.h" framework="" version="3.49.1" source="common2\services\delay\delay.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/common2/services/delay/sam0/systick_counter.h" framework="" version="3.49.1" source="common2\services\delay\sam0\systick_counter.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/adc/adc_callback.h" framework="" version="3.49.1" source="sam0\drivers\adc\adc_callback.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/adc/adc.h" framework="" version="3.49.1" source="sam0\drivers\adc\adc.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/adc/adc_sam_d_r_h/adc.c" framework="" version="3.49.1" source="sam0\drivers\adc\adc_sam_d_r_h\adc.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/adc/adc_sam_d_r_h/adc_callback.c" framework="" version="3.49.1" source="sam0\drivers\adc\adc_sam_d_r_h\adc_callback.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/adc/adc_sam_d_r_h/adc_feature.h" framework="" version="3.49.1" source="sam0\drivers\adc\adc_sam_d_r_h\adc_feature.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/dac/dac.h" framework="" version="3.49.1" source="sam0\drivers\dac\dac.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/dac/dac_callback.h" framework="" version="3.49.1" source="sam0\drivers\dac\dac_callback.h" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/dac/dac_sam_d_c_h/dac.c" framework="" version="3.49.1" source="sam0\drivers\dac\dac_sam_d_c_h\dac.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/dac/dac_sam_d_c_h/dac_callback.c" framework="" version="3.49.1" source="sam0\drivers\dac\dac_sam_d_c_h\dac_callback.c" changed="False" content-id="Atmel.ASF" />
|
||||
<file path="src/ASF/sam0/drivers/dac/dac_sam_d_c_h/dac_feature.h" framework="" version="3.49.1" source="sam0\drivers\dac\dac_sam_d_c_h\dac_feature.h" changed="False" content-id="Atmel.ASF" />
|
||||
</files>
|
||||
<documentation help="https://asf.microchip.com/docs/3.49.1/common.services.usb.class.cdc.device.example.samd21_xpro/html/index.html" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.49.1" />
|
||||
</dependencies>
|
||||
<project id="common.services.usb.class.cdc.device.example.samd21_xpro" value="Add" config="" content-id="Atmel.ASF" />
|
||||
<board id="board.samd21_xplained_pro" value="Add" config="" content-id="Atmel.ASF" />
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
<avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>
|
||||
<avrtoolserialnumber>J41800067100</avrtoolserialnumber>
|
||||
|
|
@ -363,6 +380,9 @@
|
|||
<Value>USART_CALLBACK_MODE=true</Value>
|
||||
<Value>USB_DEVICE_LPM_SUPPORT</Value>
|
||||
<Value>__FREERTOS__</Value>
|
||||
<Value>SYSTICK_MODE</Value>
|
||||
<Value>ADC_CALLBACK_MODE=true</Value>
|
||||
<Value>DAC_CALLBACK_MODE=true</Value>
|
||||
</ListValues>
|
||||
</armgcc.compiler.symbols.DefSymbols>
|
||||
<armgcc.compiler.directories.IncludePaths>
|
||||
|
|
@ -405,6 +425,12 @@
|
|||
<Value>../src/ASF/common/utils/stdio/stdio_usb</Value>
|
||||
<Value>../src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include</Value>
|
||||
<Value>../src/ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/GCC/ARM_CM0</Value>
|
||||
<Value>../src/ASF/common2/services/delay</Value>
|
||||
<Value>../src/ASF/common2/services/delay/sam0</Value>
|
||||
<Value>../src/ASF/sam0/drivers/adc</Value>
|
||||
<Value>../src/ASF/sam0/drivers/adc/adc_sam_d_r_h</Value>
|
||||
<Value>../src/ASF/sam0/drivers/dac</Value>
|
||||
<Value>../src/ASF/sam0/drivers/dac/dac_sam_d_c_h</Value>
|
||||
</ListValues>
|
||||
</armgcc.compiler.directories.IncludePaths>
|
||||
<armgcc.compiler.optimization.level>Optimize for size (-Os)</armgcc.compiler.optimization.level>
|
||||
|
|
@ -466,9 +492,15 @@
|
|||
<Value>../src/ASF/common/utils/stdio/stdio_usb</Value>
|
||||
<Value>../src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include</Value>
|
||||
<Value>../src/ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/GCC/ARM_CM0</Value>
|
||||
<Value>../src/ASF/common2/services/delay</Value>
|
||||
<Value>../src/ASF/common2/services/delay/sam0</Value>
|
||||
<Value>../src/ASF/sam0/drivers/adc</Value>
|
||||
<Value>../src/ASF/sam0/drivers/adc/adc_sam_d_r_h</Value>
|
||||
<Value>../src/ASF/sam0/drivers/dac</Value>
|
||||
<Value>../src/ASF/sam0/drivers/dac/dac_sam_d_c_h</Value>
|
||||
</ListValues>
|
||||
</armgcc.assembler.general.IncludePaths>
|
||||
<armgcc.preprocessingassembler.general.AssemblerFlags>-DARM_MATH_CM0PLUS=true -DBOARD=SAMD21_XPLAINED_PRO -DEXTINT_CALLBACK_MODE=true -DUDD_ENABLE -DUSART_CALLBACK_MODE=true -DUSB_DEVICE_LPM_SUPPORT -D__SAMD21J18A__ -D__FREERTOS__</armgcc.preprocessingassembler.general.AssemblerFlags>
|
||||
<armgcc.preprocessingassembler.general.AssemblerFlags>-DARM_MATH_CM0PLUS=true -DBOARD=SAMD21_XPLAINED_PRO -DEXTINT_CALLBACK_MODE=true -DUDD_ENABLE -DUSART_CALLBACK_MODE=true -DUSB_DEVICE_LPM_SUPPORT -D__SAMD21J18A__ -D__FREERTOS__ -DSYSTICK_MODE -DADC_CALLBACK_MODE=true -DDAC_CALLBACK_MODE=true</armgcc.preprocessingassembler.general.AssemblerFlags>
|
||||
<armgcc.preprocessingassembler.general.IncludePaths>
|
||||
<ListValues>
|
||||
<Value>../src</Value>
|
||||
|
|
@ -509,6 +541,12 @@
|
|||
<Value>../src/ASF/common/utils/stdio/stdio_usb</Value>
|
||||
<Value>../src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include</Value>
|
||||
<Value>../src/ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/GCC/ARM_CM0</Value>
|
||||
<Value>../src/ASF/common2/services/delay</Value>
|
||||
<Value>../src/ASF/common2/services/delay/sam0</Value>
|
||||
<Value>../src/ASF/sam0/drivers/adc</Value>
|
||||
<Value>../src/ASF/sam0/drivers/adc/adc_sam_d_r_h</Value>
|
||||
<Value>../src/ASF/sam0/drivers/dac</Value>
|
||||
<Value>../src/ASF/sam0/drivers/dac/dac_sam_d_c_h</Value>
|
||||
</ListValues>
|
||||
</armgcc.preprocessingassembler.general.IncludePaths>
|
||||
</ArmGcc>
|
||||
|
|
@ -533,6 +571,9 @@
|
|||
<Value>USART_CALLBACK_MODE=true</Value>
|
||||
<Value>USB_DEVICE_LPM_SUPPORT</Value>
|
||||
<Value>__FREERTOS__</Value>
|
||||
<Value>SYSTICK_MODE</Value>
|
||||
<Value>ADC_CALLBACK_MODE=true</Value>
|
||||
<Value>DAC_CALLBACK_MODE=true</Value>
|
||||
</ListValues>
|
||||
</armgcc.compiler.symbols.DefSymbols>
|
||||
<armgcc.compiler.directories.IncludePaths>
|
||||
|
|
@ -575,6 +616,13 @@
|
|||
<Value>../src/ASF/common/utils/stdio/stdio_usb</Value>
|
||||
<Value>../src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include</Value>
|
||||
<Value>../src/ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/GCC/ARM_CM0</Value>
|
||||
<Value>../src/include</Value>
|
||||
<Value>../src/ASF/common2/services/delay</Value>
|
||||
<Value>../src/ASF/common2/services/delay/sam0</Value>
|
||||
<Value>../src/ASF/sam0/drivers/adc</Value>
|
||||
<Value>../src/ASF/sam0/drivers/adc/adc_sam_d_r_h</Value>
|
||||
<Value>../src/ASF/sam0/drivers/dac</Value>
|
||||
<Value>../src/ASF/sam0/drivers/dac/dac_sam_d_c_h</Value>
|
||||
</ListValues>
|
||||
</armgcc.compiler.directories.IncludePaths>
|
||||
<armgcc.compiler.optimization.OtherFlags>-fdata-sections</armgcc.compiler.optimization.OtherFlags>
|
||||
|
|
@ -637,10 +685,16 @@
|
|||
<Value>../src/ASF/common/utils/stdio/stdio_usb</Value>
|
||||
<Value>../src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include</Value>
|
||||
<Value>../src/ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/GCC/ARM_CM0</Value>
|
||||
<Value>../src/ASF/common2/services/delay</Value>
|
||||
<Value>../src/ASF/common2/services/delay/sam0</Value>
|
||||
<Value>../src/ASF/sam0/drivers/adc</Value>
|
||||
<Value>../src/ASF/sam0/drivers/adc/adc_sam_d_r_h</Value>
|
||||
<Value>../src/ASF/sam0/drivers/dac</Value>
|
||||
<Value>../src/ASF/sam0/drivers/dac/dac_sam_d_c_h</Value>
|
||||
</ListValues>
|
||||
</armgcc.assembler.general.IncludePaths>
|
||||
<armgcc.assembler.debugging.DebugLevel>Default (-g)</armgcc.assembler.debugging.DebugLevel>
|
||||
<armgcc.preprocessingassembler.general.AssemblerFlags>-DARM_MATH_CM0PLUS=true -DBOARD=USER_BOARD -DEXTINT_CALLBACK_MODE=true -DUDD_ENABLE -DUSART_CALLBACK_MODE=true -DUSB_DEVICE_LPM_SUPPORT -D__SAMD21E16B__ -D__FREERTOS__</armgcc.preprocessingassembler.general.AssemblerFlags>
|
||||
<armgcc.preprocessingassembler.general.AssemblerFlags>-DARM_MATH_CM0PLUS=true -DBOARD=USER_BOARD -DEXTINT_CALLBACK_MODE=true -DUDD_ENABLE -DUSART_CALLBACK_MODE=true -DUSB_DEVICE_LPM_SUPPORT -D__SAMD21E16B__ -D__FREERTOS__ -DSYSTICK_MODE -DADC_CALLBACK_MODE=true -DDAC_CALLBACK_MODE=true</armgcc.preprocessingassembler.general.AssemblerFlags>
|
||||
<armgcc.preprocessingassembler.general.IncludePaths>
|
||||
<ListValues>
|
||||
<Value>../src</Value>
|
||||
|
|
@ -681,6 +735,12 @@
|
|||
<Value>../src/ASF/common/utils/stdio/stdio_usb</Value>
|
||||
<Value>../src/ASF/thirdparty/freertos/freertos-10.0.0/Source/include</Value>
|
||||
<Value>../src/ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/GCC/ARM_CM0</Value>
|
||||
<Value>../src/ASF/common2/services/delay</Value>
|
||||
<Value>../src/ASF/common2/services/delay/sam0</Value>
|
||||
<Value>../src/ASF/sam0/drivers/adc</Value>
|
||||
<Value>../src/ASF/sam0/drivers/adc/adc_sam_d_r_h</Value>
|
||||
<Value>../src/ASF/sam0/drivers/dac</Value>
|
||||
<Value>../src/ASF/sam0/drivers/dac/dac_sam_d_c_h</Value>
|
||||
</ListValues>
|
||||
</armgcc.preprocessingassembler.general.IncludePaths>
|
||||
<armgcc.preprocessingassembler.debugging.DebugLevel>Default (-Wa,-g)</armgcc.preprocessingassembler.debugging.DebugLevel>
|
||||
|
|
@ -690,6 +750,10 @@
|
|||
<ItemGroup>
|
||||
<Folder Include="src\" />
|
||||
<Folder Include="src\ASF\" />
|
||||
<Folder Include="src\ASF\common2\" />
|
||||
<Folder Include="src\ASF\common2\services\" />
|
||||
<Folder Include="src\ASF\common2\services\delay\" />
|
||||
<Folder Include="src\ASF\common2\services\delay\sam0\" />
|
||||
<Folder Include="src\ASF\common\" />
|
||||
<Folder Include="src\ASF\common\boards\" />
|
||||
<Folder Include="src\ASF\common\services\" />
|
||||
|
|
@ -710,6 +774,10 @@
|
|||
<Folder Include="src\ASF\sam0\boards\" />
|
||||
<Folder Include="src\ASF\sam0\boards\user_board" />
|
||||
<Folder Include="src\ASF\sam0\drivers\" />
|
||||
<Folder Include="src\ASF\sam0\drivers\adc\" />
|
||||
<Folder Include="src\ASF\sam0\drivers\adc\adc_sam_d_r_h\" />
|
||||
<Folder Include="src\ASF\sam0\drivers\dac\" />
|
||||
<Folder Include="src\ASF\sam0\drivers\dac\dac_sam_d_c_h\" />
|
||||
<Folder Include="src\ASF\sam0\drivers\extint\" />
|
||||
<Folder Include="src\ASF\sam0\drivers\extint\extint_sam_d_r_h\" />
|
||||
<Folder Include="src\ASF\sam0\drivers\port\" />
|
||||
|
|
@ -766,8 +834,19 @@
|
|||
<Folder Include="src\ASF\thirdparty\freertos\freertos-10.0.0\Source\portable\GCC\ARM_CM0\" />
|
||||
<Folder Include="src\ASF\thirdparty\freertos\freertos-10.0.0\Source\portable\MemMang\" />
|
||||
<Folder Include="src\config\" />
|
||||
<Folder Include="src\include" />
|
||||
<Folder Include="src\source" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="src\ASF\common2\services\delay\delay.h">
|
||||
<SubType>compile</SubType>
|
||||
</None>
|
||||
<Compile Include="src\ASF\common2\services\delay\sam0\systick_counter.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<None Include="src\ASF\common2\services\delay\sam0\systick_counter.h">
|
||||
<SubType>compile</SubType>
|
||||
</None>
|
||||
<Compile Include="src\ASF\common\utils\stdio\stdio_usb\stdio_usb.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
|
|
@ -777,6 +856,36 @@
|
|||
<Compile Include="src\ASF\sam0\boards\user_board\user_board.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<None Include="src\ASF\sam0\drivers\adc\adc_callback.h">
|
||||
<SubType>compile</SubType>
|
||||
</None>
|
||||
<None Include="src\ASF\sam0\drivers\adc\adc.h">
|
||||
<SubType>compile</SubType>
|
||||
</None>
|
||||
<Compile Include="src\ASF\sam0\drivers\adc\adc_sam_d_r_h\adc.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="src\ASF\sam0\drivers\adc\adc_sam_d_r_h\adc_callback.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<None Include="src\ASF\sam0\drivers\adc\adc_sam_d_r_h\adc_feature.h">
|
||||
<SubType>compile</SubType>
|
||||
</None>
|
||||
<None Include="src\ASF\sam0\drivers\dac\dac.h">
|
||||
<SubType>compile</SubType>
|
||||
</None>
|
||||
<None Include="src\ASF\sam0\drivers\dac\dac_callback.h">
|
||||
<SubType>compile</SubType>
|
||||
</None>
|
||||
<Compile Include="src\ASF\sam0\drivers\dac\dac_sam_d_c_h\dac.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="src\ASF\sam0\drivers\dac\dac_sam_d_c_h\dac_callback.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<None Include="src\ASF\sam0\drivers\dac\dac_sam_d_c_h\dac_feature.h">
|
||||
<SubType>compile</SubType>
|
||||
</None>
|
||||
<Compile Include="src\ASF\sam0\utils\stdio\read.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
|
|
@ -1569,9 +1678,39 @@
|
|||
<Compile Include="src\ASF\sam0\utils\syscalls\gcc\syscalls.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="src\include\adc_user.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="src\include\dac_user.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="src\include\realsence.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="src\include\tmpgood.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="src\include\ws2812.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="src\main.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="src\source\adc_user.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="src\source\dac_user.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="src\source\realsence.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="src\source\tmpgood.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="src\source\ws2812.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="src\uart_samd.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ void stdio_usb_init(void)
|
|||
# if UC3 || SAM
|
||||
// For AVR32 and SAM GCC
|
||||
// Specify that stdout and stdin should not be buffered.
|
||||
setbuf(stdout, NULL);
|
||||
setbuf(stdin, NULL);
|
||||
setbuf(stdout, NULL);
|
||||
setbuf(stdin, NULL);//setvbuf(stdin, rcvBuff, _IOLBF, 128);//setbuf(stdin, rcvBuff);////extern char rcvBuff[128];
|
||||
// Note: Already the case in IAR's Normal DLIB default configuration
|
||||
// and AVR GCC library:
|
||||
// - printf() emits one character at a time.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,91 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Common Delay Service
|
||||
*
|
||||
* Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip
|
||||
* software and any derivatives exclusively with Microchip products.
|
||||
* It is your responsibility to comply with third party license terms applicable
|
||||
* to your use of third party software (including open source software) that
|
||||
* may accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
|
||||
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
|
||||
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
|
||||
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
|
||||
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
|
||||
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
|
||||
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
|
||||
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
|
||||
*/
|
||||
#ifndef DELAY_H_INCLUDED
|
||||
#define DELAY_H_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @defgroup group_common_services_delay Busy-Wait Delay Routines
|
||||
*
|
||||
* This module provides simple loop-based delay routines for those
|
||||
* applications requiring a brief wait during execution. Common for
|
||||
* API ver. 2.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifdef SYSTICK_MODE
|
||||
#include "sam0/systick_counter.h"
|
||||
#endif
|
||||
#ifdef CYCLE_MODE
|
||||
#include "sam0/cycle_counter.h"
|
||||
#endif
|
||||
|
||||
void delay_init(void);
|
||||
|
||||
/**
|
||||
* \def delay_s
|
||||
* \brief Delay in at least specified number of seconds.
|
||||
* \param delay Delay in seconds
|
||||
*/
|
||||
#define delay_s(delay) ((delay) ? cpu_delay_s(delay) : cpu_delay_us(1))
|
||||
|
||||
/**
|
||||
* \def delay_ms
|
||||
* \brief Delay in at least specified number of milliseconds.
|
||||
* \param delay Delay in milliseconds
|
||||
*/
|
||||
#define delay_ms(delay) ((delay) ? cpu_delay_ms(delay) : cpu_delay_us(1))
|
||||
|
||||
/**
|
||||
* \def delay_us
|
||||
* \brief Delay in at least specified number of microseconds.
|
||||
* \param delay Delay in microseconds
|
||||
*/
|
||||
#define delay_us(delay) ((delay) ? cpu_delay_us(delay) : cpu_delay_us(1))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* DELAY_H_INCLUDED */
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief ARM functions for busy-wait delay loops
|
||||
*
|
||||
* Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip
|
||||
* software and any derivatives exclusively with Microchip products.
|
||||
* It is your responsibility to comply with third party license terms applicable
|
||||
* to your use of third party software (including open source software) that
|
||||
* may accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
|
||||
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
|
||||
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
|
||||
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
|
||||
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
|
||||
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
|
||||
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
|
||||
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
|
||||
*/
|
||||
|
||||
#include "delay.h"
|
||||
|
||||
/**
|
||||
* Value used to calculate ms delay. Default to be used with a 8MHz clock;
|
||||
*/
|
||||
static uint32_t cycles_per_ms = 8000000UL / 1000;
|
||||
static uint32_t cycles_per_us = 8000000UL / 1000000;
|
||||
|
||||
/**
|
||||
* \brief Initialize the delay driver.
|
||||
*
|
||||
* This must be called during start up to initialize the delay routine with
|
||||
* the current used main clock. It must run any time the main CPU clock is changed.
|
||||
*/
|
||||
void delay_init(void)
|
||||
{
|
||||
cycles_per_ms = system_gclk_gen_get_hz(0);
|
||||
cycles_per_ms /= 1000;
|
||||
cycles_per_us = cycles_per_ms / 1000;
|
||||
|
||||
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Delay loop to delay at least n number of microseconds
|
||||
*
|
||||
* \param n Number of microseconds to wait
|
||||
*/
|
||||
void delay_cycles_us(
|
||||
uint32_t n)
|
||||
{
|
||||
while (n--) {
|
||||
/* Devide up to blocks of 10u */
|
||||
delay_cycles(cycles_per_us);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Delay loop to delay at least n number of milliseconds
|
||||
*
|
||||
* \param n Number of milliseconds to wait
|
||||
*/
|
||||
void delay_cycles_ms(
|
||||
uint32_t n)
|
||||
{
|
||||
while (n--) {
|
||||
/* Devide up to blocks of 1ms */
|
||||
delay_cycles(cycles_per_ms);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief ARM functions for busy-wait delay loops
|
||||
*
|
||||
* Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip
|
||||
* software and any derivatives exclusively with Microchip products.
|
||||
* It is your responsibility to comply with third party license terms applicable
|
||||
* to your use of third party software (including open source software) that
|
||||
* may accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
|
||||
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
|
||||
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
|
||||
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
|
||||
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
|
||||
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
|
||||
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
|
||||
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
|
||||
*/
|
||||
#ifndef CYCLE_COUNTER_H_INCLUDED
|
||||
#define CYCLE_COUNTER_H_INCLUDED
|
||||
|
||||
#include <compiler.h>
|
||||
#include <clock.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \name Convenience functions for busy-wait delay loops
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Delay loop to delay n number of cycles
|
||||
* Delay program execution for at least the specified number of CPU cycles.
|
||||
*
|
||||
* \param n Number of cycles to delay
|
||||
*/
|
||||
static inline void delay_cycles(
|
||||
const uint32_t n)
|
||||
{
|
||||
if (n > 0) {
|
||||
SysTick->LOAD = n;
|
||||
SysTick->VAL = 0;
|
||||
|
||||
while (!(SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk)) {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
void delay_cycles_us(uint32_t n);
|
||||
|
||||
void delay_cycles_ms(uint32_t n);
|
||||
|
||||
/**
|
||||
* \brief Delay program execution for at least the specified number of microseconds.
|
||||
*
|
||||
* \param delay number of microseconds to wait
|
||||
*/
|
||||
#define cpu_delay_us(delay) delay_cycles_us(delay)
|
||||
|
||||
/**
|
||||
* \brief Delay program execution for at least the specified number of milliseconds.
|
||||
*
|
||||
* \param delay number of milliseconds to wait
|
||||
*/
|
||||
#define cpu_delay_ms(delay) delay_cycles_ms(delay)
|
||||
|
||||
/**
|
||||
* \brief Delay program execution for at least the specified number of seconds.
|
||||
*
|
||||
* \param delay number of seconds to wait
|
||||
*/
|
||||
#define cpu_delay_s(delay) delay_cycles_ms(1000 * delay)
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CYCLE_COUNTER_H_INCLUDED */
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,172 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM Peripheral Analog-to-Digital Converter Driver
|
||||
*
|
||||
* Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip
|
||||
* software and any derivatives exclusively with Microchip products.
|
||||
* It is your responsibility to comply with third party license terms applicable
|
||||
* to your use of third party software (including open source software) that
|
||||
* may accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
|
||||
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
|
||||
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
|
||||
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
|
||||
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
|
||||
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
|
||||
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
|
||||
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
|
||||
*/
|
||||
|
||||
#ifndef ADC_CALLBACK_H_INCLUDED
|
||||
#define ADC_CALLBACK_H_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup asfdoc_sam0_adc_group
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include <adc.h>
|
||||
|
||||
/**
|
||||
* Enum for the possible types of ADC asynchronous jobs that may be issued to
|
||||
* the driver.
|
||||
*/
|
||||
enum adc_job_type {
|
||||
/** Asynchronous ADC read into a user provided buffer */
|
||||
ADC_JOB_READ_BUFFER,
|
||||
};
|
||||
|
||||
/**
|
||||
* \name Callback Management
|
||||
* @{
|
||||
*/
|
||||
void adc_register_callback(
|
||||
struct adc_module *const module,
|
||||
adc_callback_t callback_func,
|
||||
enum adc_callback callback_type);
|
||||
|
||||
void adc_unregister_callback(
|
||||
struct adc_module *module,
|
||||
enum adc_callback callback_type);
|
||||
|
||||
/**
|
||||
* \brief Enables callback.
|
||||
*
|
||||
* Enables the callback function registered by \ref
|
||||
* adc_register_callback. The callback function will be called from the
|
||||
* interrupt handler when the conditions for the callback type are met.
|
||||
*
|
||||
* \param[in] module Pointer to ADC software instance struct
|
||||
* \param[in] callback_type Callback type given by an enum
|
||||
*
|
||||
* \return Status of the operation.
|
||||
* \retval STATUS_OK If operation was completed
|
||||
* \retval STATUS_ERR_INVALID If operation was not completed,
|
||||
* due to invalid callback_type
|
||||
*
|
||||
*/
|
||||
static inline void adc_enable_callback(
|
||||
struct adc_module *const module,
|
||||
enum adc_callback callback_type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
|
||||
/* Enable callback */
|
||||
module->enabled_callback_mask |= (1 << callback_type);
|
||||
|
||||
/* Enable window interrupt if this is a window callback */
|
||||
if (callback_type == ADC_CALLBACK_WINDOW) {
|
||||
adc_enable_interrupt(module, ADC_INTERRUPT_WINDOW);
|
||||
}
|
||||
/* Enable overrun interrupt if error callback is registered */
|
||||
if (callback_type == ADC_CALLBACK_ERROR) {
|
||||
adc_enable_interrupt(module, ADC_INTERRUPT_OVERRUN);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Disables callback.
|
||||
*
|
||||
* Disables the callback function registered by the \ref
|
||||
* adc_register_callback.
|
||||
*
|
||||
* \param[in] module Pointer to ADC software instance struct
|
||||
* \param[in] callback_type Callback type given by an enum
|
||||
*
|
||||
* \return Status of the operation.
|
||||
* \retval STATUS_OK If operation was completed
|
||||
* \retval STATUS_ERR_INVALID If operation was not completed,
|
||||
* due to invalid callback_type
|
||||
*
|
||||
*/
|
||||
static inline void adc_disable_callback(
|
||||
struct adc_module *const module,
|
||||
enum adc_callback callback_type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
|
||||
/* Disable callback */
|
||||
module->enabled_callback_mask &= ~(1 << callback_type);
|
||||
|
||||
/* Disable window interrupt if this is a window callback */
|
||||
if (callback_type == ADC_CALLBACK_WINDOW) {
|
||||
adc_disable_interrupt(module, ADC_INTERRUPT_WINDOW);
|
||||
}
|
||||
/* Disable overrun interrupt if this is the error callback */
|
||||
if (callback_type == ADC_CALLBACK_ERROR) {
|
||||
adc_disable_interrupt(module, ADC_INTERRUPT_OVERRUN);
|
||||
}
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/**
|
||||
* \name Job Management
|
||||
* @{
|
||||
*/
|
||||
enum status_code adc_read_buffer_job(
|
||||
struct adc_module *const module_inst,
|
||||
uint16_t *buffer,
|
||||
uint16_t samples);
|
||||
|
||||
enum status_code adc_get_job_status(
|
||||
struct adc_module *module_inst,
|
||||
enum adc_job_type type);
|
||||
|
||||
void adc_abort_job(
|
||||
struct adc_module *module_inst,
|
||||
enum adc_job_type type);
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ADC_CALLBACK_H_INCLUDED */
|
||||
|
|
@ -0,0 +1,726 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM Peripheral Analog-to-Digital Converter Driver
|
||||
*
|
||||
* Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip
|
||||
* software and any derivatives exclusively with Microchip products.
|
||||
* It is your responsibility to comply with third party license terms applicable
|
||||
* to your use of third party software (including open source software) that
|
||||
* may accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
|
||||
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
|
||||
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
|
||||
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
|
||||
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
|
||||
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
|
||||
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
|
||||
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
|
||||
*/
|
||||
|
||||
#include "adc.h"
|
||||
|
||||
#if SAMD20
|
||||
/* The Die revision D number */
|
||||
#define REVISON_D_NUM 3
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Initializes an ADC configuration structure to defaults
|
||||
*
|
||||
* Initializes a given ADC configuration struct to a set of known default
|
||||
* values. This function should be called on any new instance of the
|
||||
* configuration struct before being modified by the user application.
|
||||
*
|
||||
* The default configuration is as follows:
|
||||
* \li GCLK generator 0 (GCLK main) clock source
|
||||
* \li 1V from internal bandgap reference
|
||||
* \li Div 4 clock prescaler
|
||||
* \li 12-bit resolution
|
||||
* \li Window monitor disabled
|
||||
* \li No gain
|
||||
* \li Positive input on ADC PIN 0
|
||||
* \li Negative input on ADC PIN 1
|
||||
* \li Averaging disabled
|
||||
* \li Oversampling disabled
|
||||
* \li Right adjust data
|
||||
* \li Single-ended mode
|
||||
* \li Free running disabled
|
||||
* \li All events (input and generation) disabled
|
||||
* \li Sleep operation disabled
|
||||
* \li No reference compensation
|
||||
* \li No gain/offset correction
|
||||
* \li No added sampling time
|
||||
* \li Pin scan mode disabled
|
||||
*
|
||||
* \param[out] config Pointer to configuration struct to initialize to
|
||||
* default values
|
||||
*/
|
||||
void adc_get_config_defaults(struct adc_config *const config)
|
||||
{
|
||||
Assert(config);
|
||||
config->clock_source = GCLK_GENERATOR_0;
|
||||
config->reference = ADC_REFERENCE_INT1V;
|
||||
config->clock_prescaler = ADC_CLOCK_PRESCALER_DIV4;
|
||||
config->resolution = ADC_RESOLUTION_12BIT;
|
||||
config->window.window_mode = ADC_WINDOW_MODE_DISABLE;
|
||||
config->window.window_upper_value = 0;
|
||||
config->window.window_lower_value = 0;
|
||||
config->gain_factor = ADC_GAIN_FACTOR_1X;
|
||||
#if SAMR21
|
||||
config->positive_input = ADC_POSITIVE_INPUT_PIN6 ;
|
||||
#else
|
||||
config->positive_input = ADC_POSITIVE_INPUT_PIN0 ;
|
||||
#endif
|
||||
config->negative_input = ADC_NEGATIVE_INPUT_GND ;
|
||||
config->accumulate_samples = ADC_ACCUMULATE_DISABLE;
|
||||
config->divide_result = ADC_DIVIDE_RESULT_DISABLE;
|
||||
config->left_adjust = false;
|
||||
config->differential_mode = false;
|
||||
config->freerunning = false;
|
||||
config->event_action = ADC_EVENT_ACTION_DISABLED;
|
||||
config->run_in_standby = false;
|
||||
config->reference_compensation_enable = false;
|
||||
config->correction.correction_enable = false;
|
||||
config->correction.gain_correction = ADC_GAINCORR_RESETVALUE;
|
||||
config->correction.offset_correction = ADC_OFFSETCORR_RESETVALUE;
|
||||
config->sample_length = 0;
|
||||
config->pin_scan.offset_start_scan = 0;
|
||||
config->pin_scan.inputs_to_scan = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Sets the ADC window mode
|
||||
*
|
||||
* Sets the ADC window mode to a given mode and value range.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the ADC software instance struct
|
||||
* \param[in] window_mode Window monitor mode to set
|
||||
* \param[in] window_lower_value Lower window monitor threshold value
|
||||
* \param[in] window_upper_value Upper window monitor threshold value
|
||||
*/
|
||||
void adc_set_window_mode(
|
||||
struct adc_module *const module_inst,
|
||||
const enum adc_window_mode window_mode,
|
||||
const int16_t window_lower_value,
|
||||
const int16_t window_upper_value)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
|
||||
Adc *const adc_module = module_inst->hw;
|
||||
|
||||
while (adc_is_syncing(module_inst)) {
|
||||
/* Wait for synchronization */
|
||||
}
|
||||
|
||||
/* Set window mode */
|
||||
adc_module->WINCTRL.reg = window_mode << ADC_WINCTRL_WINMODE_Pos;
|
||||
|
||||
while (adc_is_syncing(module_inst)) {
|
||||
/* Wait for synchronization */
|
||||
}
|
||||
|
||||
/* Set lower window monitor threshold value */
|
||||
adc_module->WINLT.reg = window_lower_value << ADC_WINLT_WINLT_Pos;
|
||||
|
||||
while (adc_is_syncing(module_inst)) {
|
||||
/* Wait for synchronization */
|
||||
}
|
||||
|
||||
/* Set upper window monitor threshold value */
|
||||
adc_module->WINUT.reg = window_upper_value << ADC_WINUT_WINUT_Pos;
|
||||
}
|
||||
|
||||
/**
|
||||
* \internal Configure MUX settings for the analog pins
|
||||
*
|
||||
* This function will set the given ADC input pins
|
||||
* to the analog function in the pinmux, giving
|
||||
* the ADC access to the analog signal
|
||||
*
|
||||
* \param [in] pin AINxx pin to configure
|
||||
*/
|
||||
static inline void _adc_configure_ain_pin(uint32_t pin)
|
||||
{
|
||||
#define PIN_INVALID_ADC_AIN 0xFFFFUL
|
||||
|
||||
/* Pinmapping table for AINxx -> GPIO pin number */
|
||||
const uint32_t pinmapping[] = {
|
||||
#if (SAMD20E) || (SAMD21E)|| (SAMDA1E)
|
||||
PIN_PA02B_ADC_AIN0, PIN_PA03B_ADC_AIN1,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_PA04B_ADC_AIN4, PIN_PA05B_ADC_AIN5,
|
||||
PIN_PA06B_ADC_AIN6, PIN_PA07B_ADC_AIN7,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_PA08B_ADC_AIN16, PIN_PA09B_ADC_AIN17,
|
||||
PIN_PA10B_ADC_AIN18, PIN_PA11B_ADC_AIN19,
|
||||
#elif (SAMD20G) || (SAMD21G)|| (SAMDA1G)
|
||||
PIN_PA02B_ADC_AIN0, PIN_PA03B_ADC_AIN1,
|
||||
PIN_PB08B_ADC_AIN2, PIN_PB09B_ADC_AIN3,
|
||||
PIN_PA04B_ADC_AIN4, PIN_PA05B_ADC_AIN5,
|
||||
PIN_PA06B_ADC_AIN6, PIN_PA07B_ADC_AIN7,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_PB02B_ADC_AIN10, PIN_PB03B_ADC_AIN11,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_PA08B_ADC_AIN16, PIN_PA09B_ADC_AIN17,
|
||||
PIN_PA10B_ADC_AIN18, PIN_PA11B_ADC_AIN19,
|
||||
#elif (SAMD20J) || (SAMD21J)|| (SAMDA1J)
|
||||
PIN_PA02B_ADC_AIN0, PIN_PA03B_ADC_AIN1,
|
||||
PIN_PB08B_ADC_AIN2, PIN_PB09B_ADC_AIN3,
|
||||
PIN_PA04B_ADC_AIN4, PIN_PA05B_ADC_AIN5,
|
||||
PIN_PA06B_ADC_AIN6, PIN_PA07B_ADC_AIN7,
|
||||
PIN_PB00B_ADC_AIN8, PIN_PB01B_ADC_AIN9,
|
||||
PIN_PB02B_ADC_AIN10, PIN_PB03B_ADC_AIN11,
|
||||
PIN_PB04B_ADC_AIN12, PIN_PB05B_ADC_AIN13,
|
||||
PIN_PB06B_ADC_AIN14, PIN_PB07B_ADC_AIN15,
|
||||
PIN_PA08B_ADC_AIN16, PIN_PA09B_ADC_AIN17,
|
||||
PIN_PA10B_ADC_AIN18, PIN_PA11B_ADC_AIN19,
|
||||
#elif SAMR21E
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_PA06B_ADC_AIN6, PIN_PA07B_ADC_AIN7,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_PA08B_ADC_AIN16, PIN_PA09B_ADC_AIN17,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
#elif SAMR21G
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_PA04B_ADC_AIN4, PIN_PA05B_ADC_AIN5,
|
||||
PIN_PA06B_ADC_AIN6, PIN_PA07B_ADC_AIN7,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_PB02B_ADC_AIN10, PIN_PB03B_ADC_AIN11,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_PA08B_ADC_AIN16, PIN_PA09B_ADC_AIN17,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
#elif (SAMD09C) || (SAMD10C) || (SAMD11C)
|
||||
PIN_PA02B_ADC_AIN0, PIN_INVALID_ADC_AIN,
|
||||
PIN_PA04B_ADC_AIN2, PIN_PA05B_ADC_AIN3,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_PA14B_ADC_AIN6, PIN_PA15B_ADC_AIN7,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
#elif (SAMD09D)
|
||||
PIN_PA02B_ADC_AIN0, PIN_PA03B_ADC_AIN1,
|
||||
PIN_PA04B_ADC_AIN2, PIN_PA05B_ADC_AIN3,
|
||||
PIN_PA06B_ADC_AIN4, PIN_PA07B_ADC_AIN5,
|
||||
PIN_PA14B_ADC_AIN6, PIN_PA15B_ADC_AIN7,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
#elif (SAMD10DS) || (SAMD10DU) || (SAMD11DS) || (SAMD11DU)
|
||||
PIN_PA02B_ADC_AIN0, PIN_PA03B_ADC_AIN1,
|
||||
PIN_PA04B_ADC_AIN2, PIN_PA05B_ADC_AIN3,
|
||||
PIN_PA06B_ADC_AIN4, PIN_PA07B_ADC_AIN5,
|
||||
PIN_PA14B_ADC_AIN6, PIN_PA15B_ADC_AIN7,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
#elif (SAMD10DM) || (SAMD11DM)
|
||||
PIN_PA02B_ADC_AIN0, PIN_PA03B_ADC_AIN1,
|
||||
PIN_PA04B_ADC_AIN2, PIN_PA05B_ADC_AIN3,
|
||||
PIN_PA06B_ADC_AIN4, PIN_PA07B_ADC_AIN5,
|
||||
PIN_PA14B_ADC_AIN6, PIN_PA15B_ADC_AIN7,
|
||||
PIN_PA10B_ADC_AIN8, PIN_PA11B_ADC_AIN9,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
#elif (SAMHA1G) || (SAMHA0G)
|
||||
PIN_PA02B_ADC_AIN0, PIN_PA03B_ADC_AIN1,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_PA04B_ADC_AIN4, PIN_PA05B_ADC_AIN5,
|
||||
PIN_PA06B_ADC_AIN6, PIN_PA07B_ADC_AIN7,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_PB03B_ADC_AIN11,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_PB06B_ADC_AIN14, PIN_PB07B_ADC_AIN15,
|
||||
PIN_PA08B_ADC_AIN16, PIN_PA09B_ADC_AIN17,
|
||||
PIN_PA10B_ADC_AIN18, PIN_PA11B_ADC_AIN19,
|
||||
#elif (SAMHA1E) || (SAMHA0E)
|
||||
PIN_PA02B_ADC_AIN0, PIN_PA03B_ADC_AIN1,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_PA06B_ADC_AIN6, PIN_PA07B_ADC_AIN7,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
|
||||
PIN_PA08B_ADC_AIN16, PIN_PA09B_ADC_AIN17,
|
||||
#else
|
||||
# error ADC pin mappings are not defined for this device.
|
||||
#endif
|
||||
};
|
||||
|
||||
uint32_t pin_map_result = PIN_INVALID_ADC_AIN;
|
||||
|
||||
if (pin <= ADC_EXTCHANNEL_MSB) {
|
||||
pin_map_result = pinmapping[pin >> ADC_INPUTCTRL_MUXPOS_Pos];
|
||||
|
||||
Assert(pin_map_result != PIN_INVALID_ADC_AIN);
|
||||
|
||||
struct system_pinmux_config config;
|
||||
system_pinmux_get_config_defaults(&config);
|
||||
|
||||
/* Analog functions are all on MUX setting B */
|
||||
config.input_pull = SYSTEM_PINMUX_PIN_PULL_NONE;
|
||||
config.mux_position = 1;
|
||||
|
||||
system_pinmux_pin_set_config(pin_map_result, &config);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \internal Writes an ADC configuration to the hardware module
|
||||
*
|
||||
* Writes out a given ADC module configuration to the hardware module.
|
||||
*
|
||||
* \param[out] module_inst Pointer to the ADC software instance struct
|
||||
* \param[in] config Pointer to configuration struct
|
||||
*
|
||||
* \return Status of the configuration procedure
|
||||
* \retval STATUS_OK The configuration was successful
|
||||
* \retval STATUS_ERR_INVALID_ARG Invalid argument(s) were provided
|
||||
*/
|
||||
static enum status_code _adc_set_config(
|
||||
struct adc_module *const module_inst,
|
||||
struct adc_config *const config)
|
||||
{
|
||||
uint8_t adjres = 0;
|
||||
uint32_t resolution = ADC_RESOLUTION_16BIT;
|
||||
enum adc_accumulate_samples accumulate = ADC_ACCUMULATE_DISABLE;
|
||||
#if SAMD20
|
||||
uint8_t revision_num = ((REG_DSU_DID & DSU_DID_REVISION_Msk) >> DSU_DID_REVISION_Pos);
|
||||
#endif
|
||||
|
||||
/* Get the hardware module pointer */
|
||||
Adc *const adc_module = module_inst->hw;
|
||||
|
||||
/* Configure GCLK channel and enable clock */
|
||||
struct system_gclk_chan_config gclk_chan_conf;
|
||||
system_gclk_chan_get_config_defaults(&gclk_chan_conf);
|
||||
gclk_chan_conf.source_generator = config->clock_source;
|
||||
system_gclk_chan_set_config(ADC_GCLK_ID, &gclk_chan_conf);
|
||||
system_gclk_chan_enable(ADC_GCLK_ID);
|
||||
|
||||
/* Setup pinmuxing for analog inputs */
|
||||
if (config->pin_scan.inputs_to_scan != 0) {
|
||||
uint8_t offset = config->pin_scan.offset_start_scan;
|
||||
uint8_t start_pin =
|
||||
offset +(uint8_t)config->positive_input;
|
||||
uint8_t end_pin =
|
||||
start_pin + config->pin_scan.inputs_to_scan;
|
||||
|
||||
while (start_pin < end_pin) {
|
||||
_adc_configure_ain_pin((offset % 16)+(uint8_t)config->positive_input);
|
||||
start_pin++;
|
||||
offset++;
|
||||
}
|
||||
_adc_configure_ain_pin(config->negative_input);
|
||||
} else {
|
||||
_adc_configure_ain_pin(config->positive_input);
|
||||
_adc_configure_ain_pin(config->negative_input);
|
||||
}
|
||||
|
||||
/* Configure run in standby */
|
||||
adc_module->CTRLA.reg = (config->run_in_standby << ADC_CTRLA_RUNSTDBY_Pos);
|
||||
|
||||
/* Configure reference */
|
||||
adc_module->REFCTRL.reg =
|
||||
(config->reference_compensation_enable << ADC_REFCTRL_REFCOMP_Pos) |
|
||||
(config->reference);
|
||||
|
||||
/* Set adjusting result and number of samples */
|
||||
switch (config->resolution) {
|
||||
|
||||
case ADC_RESOLUTION_CUSTOM:
|
||||
adjres = config->divide_result;
|
||||
accumulate = config->accumulate_samples;
|
||||
/* 16-bit result register */
|
||||
resolution = ADC_RESOLUTION_16BIT;
|
||||
break;
|
||||
|
||||
case ADC_RESOLUTION_13BIT:
|
||||
/* Increase resolution by 1 bit */
|
||||
adjres = ADC_DIVIDE_RESULT_2;
|
||||
accumulate = ADC_ACCUMULATE_SAMPLES_4;
|
||||
/* 16-bit result register */
|
||||
resolution = ADC_RESOLUTION_16BIT;
|
||||
break;
|
||||
|
||||
case ADC_RESOLUTION_14BIT:
|
||||
/* Increase resolution by 2 bit */
|
||||
adjres = ADC_DIVIDE_RESULT_4;
|
||||
accumulate = ADC_ACCUMULATE_SAMPLES_16;
|
||||
/* 16-bit result register */
|
||||
resolution = ADC_RESOLUTION_16BIT;
|
||||
break;
|
||||
#if SAMD20
|
||||
/* See $35.1.8 for ADC errata of SAM D20.
|
||||
The revisions before D have this issue.*/
|
||||
case ADC_RESOLUTION_15BIT:
|
||||
/* Increase resolution by 3 bit */
|
||||
if(revision_num < REVISON_D_NUM) {
|
||||
adjres = ADC_DIVIDE_RESULT_8;
|
||||
} else {
|
||||
adjres = ADC_DIVIDE_RESULT_2;
|
||||
}
|
||||
accumulate = ADC_ACCUMULATE_SAMPLES_64;
|
||||
/* 16-bit result register */
|
||||
resolution = ADC_RESOLUTION_16BIT;
|
||||
break;
|
||||
|
||||
case ADC_RESOLUTION_16BIT:
|
||||
if(revision_num < REVISON_D_NUM) {
|
||||
/* Increase resolution by 4 bit */
|
||||
adjres = ADC_DIVIDE_RESULT_16;
|
||||
} else {
|
||||
adjres = ADC_DIVIDE_RESULT_DISABLE;
|
||||
}
|
||||
accumulate = ADC_ACCUMULATE_SAMPLES_256;
|
||||
/* 16-bit result register */
|
||||
resolution = ADC_RESOLUTION_16BIT;
|
||||
break;
|
||||
#else
|
||||
case ADC_RESOLUTION_15BIT:
|
||||
/* Increase resolution by 3 bit */
|
||||
adjres = ADC_DIVIDE_RESULT_2;
|
||||
accumulate = ADC_ACCUMULATE_SAMPLES_64;
|
||||
/* 16-bit result register */
|
||||
resolution = ADC_RESOLUTION_16BIT;
|
||||
break;
|
||||
|
||||
case ADC_RESOLUTION_16BIT:
|
||||
/* Increase resolution by 4 bit */
|
||||
adjres = ADC_DIVIDE_RESULT_DISABLE;
|
||||
accumulate = ADC_ACCUMULATE_SAMPLES_256;
|
||||
/* 16-bit result register */
|
||||
resolution = ADC_RESOLUTION_16BIT;
|
||||
break;
|
||||
#endif
|
||||
case ADC_RESOLUTION_8BIT:
|
||||
/* 8-bit result register */
|
||||
resolution = ADC_RESOLUTION_8BIT;
|
||||
break;
|
||||
case ADC_RESOLUTION_10BIT:
|
||||
/* 10-bit result register */
|
||||
resolution = ADC_RESOLUTION_10BIT;
|
||||
break;
|
||||
case ADC_RESOLUTION_12BIT:
|
||||
/* 12-bit result register */
|
||||
resolution = ADC_RESOLUTION_12BIT;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* Unknown. Abort. */
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
adc_module->AVGCTRL.reg = ADC_AVGCTRL_ADJRES(adjres) | accumulate;
|
||||
|
||||
/* Check validity of sample length value */
|
||||
if (config->sample_length > 63) {
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
} else {
|
||||
/* Configure sample length */
|
||||
adc_module->SAMPCTRL.reg =
|
||||
(config->sample_length << ADC_SAMPCTRL_SAMPLEN_Pos);
|
||||
}
|
||||
|
||||
while (adc_is_syncing(module_inst)) {
|
||||
/* Wait for synchronization */
|
||||
}
|
||||
|
||||
/* Configure CTRLB */
|
||||
adc_module->CTRLB.reg =
|
||||
config->clock_prescaler |
|
||||
resolution |
|
||||
(config->correction.correction_enable << ADC_CTRLB_CORREN_Pos) |
|
||||
(config->freerunning << ADC_CTRLB_FREERUN_Pos) |
|
||||
(config->left_adjust << ADC_CTRLB_LEFTADJ_Pos) |
|
||||
(config->differential_mode << ADC_CTRLB_DIFFMODE_Pos);
|
||||
|
||||
/* Check validity of window thresholds */
|
||||
if (config->window.window_mode != ADC_WINDOW_MODE_DISABLE) {
|
||||
switch (resolution) {
|
||||
case ADC_RESOLUTION_8BIT:
|
||||
if (config->differential_mode &&
|
||||
(config->window.window_lower_value > 127 ||
|
||||
config->window.window_lower_value < -128 ||
|
||||
config->window.window_upper_value > 127 ||
|
||||
config->window.window_upper_value < -128)) {
|
||||
/* Invalid value */
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
} else if (config->window.window_lower_value > 255 ||
|
||||
config->window.window_upper_value > 255){
|
||||
/* Invalid value */
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
break;
|
||||
case ADC_RESOLUTION_10BIT:
|
||||
if (config->differential_mode &&
|
||||
(config->window.window_lower_value > 511 ||
|
||||
config->window.window_lower_value < -512 ||
|
||||
config->window.window_upper_value > 511 ||
|
||||
config->window.window_upper_value < -512)) {
|
||||
/* Invalid value */
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
} else if (config->window.window_lower_value > 1023 ||
|
||||
config->window.window_upper_value > 1023){
|
||||
/* Invalid value */
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
break;
|
||||
case ADC_RESOLUTION_12BIT:
|
||||
if (config->differential_mode &&
|
||||
(config->window.window_lower_value > 2047 ||
|
||||
config->window.window_lower_value < -2048 ||
|
||||
config->window.window_upper_value > 2047 ||
|
||||
config->window.window_upper_value < -2048)) {
|
||||
/* Invalid value */
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
} else if (config->window.window_lower_value > 4095 ||
|
||||
config->window.window_upper_value > 4095){
|
||||
/* Invalid value */
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
break;
|
||||
case ADC_RESOLUTION_16BIT:
|
||||
if (config->differential_mode &&
|
||||
(config->window.window_lower_value > 32767 ||
|
||||
config->window.window_lower_value < -32768 ||
|
||||
config->window.window_upper_value > 32767 ||
|
||||
config->window.window_upper_value < -32768)) {
|
||||
/* Invalid value */
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
} else if (config->window.window_lower_value > 65535 ||
|
||||
config->window.window_upper_value > 65535){
|
||||
/* Invalid value */
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
while (adc_is_syncing(module_inst)) {
|
||||
/* Wait for synchronization */
|
||||
}
|
||||
|
||||
/* Configure window mode */
|
||||
adc_module->WINCTRL.reg = config->window.window_mode;
|
||||
|
||||
while (adc_is_syncing(module_inst)) {
|
||||
/* Wait for synchronization */
|
||||
}
|
||||
|
||||
/* Configure lower threshold */
|
||||
adc_module->WINLT.reg =
|
||||
config->window.window_lower_value << ADC_WINLT_WINLT_Pos;
|
||||
|
||||
while (adc_is_syncing(module_inst)) {
|
||||
/* Wait for synchronization */
|
||||
}
|
||||
|
||||
/* Configure lower threshold */
|
||||
adc_module->WINUT.reg = config->window.window_upper_value <<
|
||||
ADC_WINUT_WINUT_Pos;
|
||||
|
||||
uint8_t inputs_to_scan = config->pin_scan.inputs_to_scan;
|
||||
if (inputs_to_scan > 0) {
|
||||
/*
|
||||
* Number of input sources included is the value written to INPUTSCAN
|
||||
* plus 1.
|
||||
*/
|
||||
inputs_to_scan--;
|
||||
}
|
||||
|
||||
if (inputs_to_scan > (ADC_INPUTCTRL_INPUTSCAN_Msk >> ADC_INPUTCTRL_INPUTSCAN_Pos) ||
|
||||
config->pin_scan.offset_start_scan > (ADC_INPUTCTRL_INPUTOFFSET_Msk >> ADC_INPUTCTRL_INPUTOFFSET_Pos)) {
|
||||
/* Invalid number of input pins or input offset */
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
while (adc_is_syncing(module_inst)) {
|
||||
/* Wait for synchronization */
|
||||
}
|
||||
|
||||
/* Configure pin scan mode and positive and negative input pins */
|
||||
adc_module->INPUTCTRL.reg =
|
||||
config->gain_factor |
|
||||
(config->pin_scan.offset_start_scan <<
|
||||
ADC_INPUTCTRL_INPUTOFFSET_Pos) |
|
||||
(inputs_to_scan << ADC_INPUTCTRL_INPUTSCAN_Pos) |
|
||||
config->negative_input |
|
||||
config->positive_input;
|
||||
|
||||
/* Configure events */
|
||||
adc_module->EVCTRL.reg = config->event_action;
|
||||
|
||||
/* Disable all interrupts */
|
||||
adc_module->INTENCLR.reg =
|
||||
(1 << ADC_INTENCLR_SYNCRDY_Pos) | (1 << ADC_INTENCLR_WINMON_Pos) |
|
||||
(1 << ADC_INTENCLR_OVERRUN_Pos) | (1 << ADC_INTENCLR_RESRDY_Pos);
|
||||
|
||||
if (config->correction.correction_enable){
|
||||
/* Make sure gain_correction value is valid */
|
||||
if (config->correction.gain_correction > ADC_GAINCORR_GAINCORR_Msk) {
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
} else {
|
||||
/* Set gain correction value */
|
||||
adc_module->GAINCORR.reg = config->correction.gain_correction <<
|
||||
ADC_GAINCORR_GAINCORR_Pos;
|
||||
}
|
||||
|
||||
/* Make sure offset correction value is valid */
|
||||
if (config->correction.offset_correction > 2047 ||
|
||||
config->correction.offset_correction < -2048) {
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
} else {
|
||||
/* Set offset correction value */
|
||||
adc_module->OFFSETCORR.reg = config->correction.offset_correction <<
|
||||
ADC_OFFSETCORR_OFFSETCORR_Pos;
|
||||
}
|
||||
}
|
||||
|
||||
/* Load in the fixed device ADC calibration constants */
|
||||
adc_module->CALIB.reg =
|
||||
ADC_CALIB_BIAS_CAL(
|
||||
(*(uint32_t *)ADC_FUSES_BIASCAL_ADDR >> ADC_FUSES_BIASCAL_Pos)
|
||||
) |
|
||||
ADC_CALIB_LINEARITY_CAL(
|
||||
(*(uint64_t *)ADC_FUSES_LINEARITY_0_ADDR >> ADC_FUSES_LINEARITY_0_Pos)
|
||||
);
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Initializes the ADC channel sequence
|
||||
*
|
||||
* Like SAMD and SAMR21 the INPUTOFFSET register will be incremented one
|
||||
* automatically after a conversion done, causing the next conversion
|
||||
* to be done with the positive input equal to MUXPOS + INPUTOFFSET,
|
||||
* it is scanning continuously one by one even ADC channels are not continuous.
|
||||
*
|
||||
* Initializes the ADC channel sequence by the sequence of pin_array.
|
||||
*
|
||||
* \param[in] pin_array The array of the Mux selection for the positive ADC input
|
||||
* \param[in] size The size of pin_array
|
||||
*/
|
||||
void adc_regular_ain_channel(uint32_t *pin_array, uint8_t size)
|
||||
{
|
||||
for (int i = 0; i < size; i++) {
|
||||
_adc_configure_ain_pin(pin_array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Initializes the ADC
|
||||
*
|
||||
* Initializes the ADC device struct and the hardware module based on the
|
||||
* given configuration struct values.
|
||||
*
|
||||
* \param[out] module_inst Pointer to the ADC software instance struct
|
||||
* \param[in] hw Pointer to the ADC module instance
|
||||
* \param[in] config Pointer to the configuration struct
|
||||
*
|
||||
* \return Status of the initialization procedure.
|
||||
* \retval STATUS_OK The initialization was successful
|
||||
* \retval STATUS_ERR_INVALID_ARG Invalid argument(s) were provided
|
||||
* \retval STATUS_BUSY The module is busy with a reset operation
|
||||
* \retval STATUS_ERR_DENIED The module is enabled
|
||||
*/
|
||||
enum status_code adc_init(
|
||||
struct adc_module *const module_inst,
|
||||
Adc *hw,
|
||||
struct adc_config *config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(hw);
|
||||
Assert(config);
|
||||
|
||||
/* Associate the software module instance with the hardware module */
|
||||
module_inst->hw = hw;
|
||||
|
||||
/* Turn on the digital interface clock */
|
||||
system_apb_clock_set_mask(SYSTEM_CLOCK_APB_APBC, PM_APBCMASK_ADC);
|
||||
|
||||
if (hw->CTRLA.reg & ADC_CTRLA_SWRST) {
|
||||
/* We are in the middle of a reset. Abort. */
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
|
||||
if (hw->CTRLA.reg & ADC_CTRLA_ENABLE) {
|
||||
/* Module must be disabled before initialization. Abort. */
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
/* Store the selected reference for later use */
|
||||
module_inst->reference = config->reference;
|
||||
|
||||
/* Make sure bandgap is enabled if requested by the config */
|
||||
if (module_inst->reference == ADC_REFERENCE_INT1V) {
|
||||
system_voltage_reference_enable(SYSTEM_VOLTAGE_REFERENCE_BANDGAP);
|
||||
}
|
||||
|
||||
#if ADC_CALLBACK_MODE == true
|
||||
for (uint8_t i = 0; i < ADC_CALLBACK_N; i++) {
|
||||
module_inst->callback[i] = NULL;
|
||||
};
|
||||
|
||||
module_inst->registered_callback_mask = 0;
|
||||
module_inst->enabled_callback_mask = 0;
|
||||
module_inst->remaining_conversions = 0;
|
||||
module_inst->job_status = STATUS_OK;
|
||||
|
||||
_adc_instances[0] = module_inst;
|
||||
|
||||
if (config->event_action == ADC_EVENT_ACTION_DISABLED &&
|
||||
!config->freerunning) {
|
||||
module_inst->software_trigger = true;
|
||||
} else {
|
||||
module_inst->software_trigger = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Write configuration to module */
|
||||
return _adc_set_config(module_inst, config);
|
||||
}
|
||||
|
|
@ -0,0 +1,247 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM Peripheral Analog-to-Digital Converter Driver
|
||||
*
|
||||
* Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip
|
||||
* software and any derivatives exclusively with Microchip products.
|
||||
* It is your responsibility to comply with third party license terms applicable
|
||||
* to your use of third party software (including open source software) that
|
||||
* may accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
|
||||
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
|
||||
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
|
||||
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
|
||||
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
|
||||
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
|
||||
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
|
||||
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
|
||||
*/
|
||||
#include "adc_callback.h"
|
||||
|
||||
struct adc_module *_adc_instances[ADC_INST_NUM];
|
||||
|
||||
static void _adc_interrupt_handler(const uint8_t instance)
|
||||
{
|
||||
struct adc_module *module = _adc_instances[instance];
|
||||
|
||||
/* get interrupt flags and mask out enabled callbacks */
|
||||
uint32_t flags = module->hw->INTFLAG.reg & module->hw->INTENSET.reg;
|
||||
|
||||
if (flags & ADC_INTFLAG_RESRDY) {
|
||||
/* clear interrupt flag */
|
||||
module->hw->INTFLAG.reg = ADC_INTFLAG_RESRDY;
|
||||
|
||||
while (adc_is_syncing(module)) {
|
||||
/* Wait for synchronization */
|
||||
}
|
||||
|
||||
/* store ADC result in job buffer */
|
||||
*(module->job_buffer++) = module->hw->RESULT.reg;
|
||||
|
||||
if (--module->remaining_conversions > 0) {
|
||||
if (module->software_trigger == true) {
|
||||
adc_start_conversion(module);
|
||||
}
|
||||
} else {
|
||||
adc_disable_interrupt(module, ADC_INTERRUPT_RESULT_READY);
|
||||
if (module->job_status == STATUS_BUSY) {
|
||||
/* job is complete. update status,disable interrupt
|
||||
*and call callback */
|
||||
module->job_status = STATUS_OK;
|
||||
|
||||
if ((module->enabled_callback_mask &
|
||||
(1 << ADC_CALLBACK_READ_BUFFER)) &&
|
||||
(module->registered_callback_mask &
|
||||
(1 << ADC_CALLBACK_READ_BUFFER))) {
|
||||
(module->callback[ADC_CALLBACK_READ_BUFFER])(module);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & ADC_INTFLAG_WINMON) {
|
||||
module->hw->INTFLAG.reg = ADC_INTFLAG_WINMON;
|
||||
if ((module->enabled_callback_mask & (1 << ADC_CALLBACK_WINDOW)) &&
|
||||
(module->registered_callback_mask & (1 << ADC_CALLBACK_WINDOW))) {
|
||||
(module->callback[ADC_CALLBACK_WINDOW])(module);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (flags & ADC_INTFLAG_OVERRUN) {
|
||||
module->hw->INTFLAG.reg = ADC_INTFLAG_OVERRUN;
|
||||
if ((module->enabled_callback_mask & (1 << ADC_CALLBACK_ERROR)) &&
|
||||
(module->registered_callback_mask & (1 << ADC_CALLBACK_ERROR))) {
|
||||
(module->callback[ADC_CALLBACK_ERROR])(module);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Interrupt handler for the ADC module. */
|
||||
void ADC_Handler(void)
|
||||
{
|
||||
_adc_interrupt_handler(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Registers a callback
|
||||
*
|
||||
* Registers a callback function which is implemented by the user.
|
||||
*
|
||||
* \note The callback must be enabled by for the interrupt handler to call it
|
||||
* when the condition for the callback is met.
|
||||
*
|
||||
* \param[in] module Pointer to ADC software instance struct
|
||||
* \param[in] callback_func Pointer to callback function
|
||||
* \param[in] callback_type Callback type given by an enum
|
||||
*
|
||||
*/
|
||||
void adc_register_callback(
|
||||
struct adc_module *const module,
|
||||
adc_callback_t callback_func,
|
||||
enum adc_callback callback_type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
Assert(callback_func);
|
||||
|
||||
/* Register callback function */
|
||||
module->callback[callback_type] = callback_func;
|
||||
|
||||
/* Set the bit corresponding to the callback_type */
|
||||
module->registered_callback_mask |= (1 << callback_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Unregisters a callback
|
||||
*
|
||||
* Unregisters a callback function which is implemented by the user.
|
||||
*
|
||||
* \param[in] module Pointer to ADC software instance struct
|
||||
* \param[in] callback_type Callback type given by an enum
|
||||
*
|
||||
*/
|
||||
void adc_unregister_callback(
|
||||
struct adc_module *const module,
|
||||
enum adc_callback callback_type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module);
|
||||
|
||||
/* Unregister callback function */
|
||||
module->callback[callback_type] = NULL;
|
||||
|
||||
/* Clear the bit corresponding to the callback_type */
|
||||
module->registered_callback_mask &= ~(1 << callback_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Read multiple samples from ADC
|
||||
*
|
||||
* Read \c samples samples from the ADC into the buffer \c buffer.
|
||||
* If there is no hardware trigger defined (event action) the
|
||||
* driver will retrigger the ADC conversion whenever a conversion
|
||||
* is complete until \c samples samples has been acquired. To avoid
|
||||
* jitter in the sampling frequency using an event trigger is advised.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the ADC software instance struct
|
||||
* \param[in] samples Number of samples to acquire
|
||||
* \param[out] buffer Buffer to store the ADC samples
|
||||
*
|
||||
* \return Status of the job start.
|
||||
* \retval STATUS_OK The conversion job was started successfully and is
|
||||
* in progress
|
||||
* \retval STATUS_BUSY The ADC is already busy with another job
|
||||
*/
|
||||
enum status_code adc_read_buffer_job(
|
||||
struct adc_module *const module_inst,
|
||||
uint16_t *buffer,
|
||||
uint16_t samples)
|
||||
{
|
||||
Assert(module_inst);
|
||||
Assert(samples);
|
||||
Assert(buffer);
|
||||
|
||||
if(module_inst->remaining_conversions != 0 ||
|
||||
module_inst->job_status == STATUS_BUSY){
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
|
||||
module_inst->job_status = STATUS_BUSY;
|
||||
module_inst->remaining_conversions = samples;
|
||||
module_inst->job_buffer = buffer;
|
||||
|
||||
adc_enable_interrupt(module_inst, ADC_INTERRUPT_RESULT_READY);
|
||||
|
||||
if(module_inst->software_trigger == true) {
|
||||
adc_start_conversion(module_inst);
|
||||
}
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Gets the status of a job
|
||||
*
|
||||
* Gets the status of an ongoing or the last job.
|
||||
*
|
||||
* \param [in] module_inst Pointer to the ADC software instance struct
|
||||
* \param [in] type Type of job to get status
|
||||
*
|
||||
* \return Status of the job.
|
||||
*/
|
||||
enum status_code adc_get_job_status(
|
||||
struct adc_module *module_inst,
|
||||
enum adc_job_type type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
|
||||
if (type == ADC_JOB_READ_BUFFER ) {
|
||||
return module_inst->job_status;
|
||||
} else {
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Aborts an ongoing job
|
||||
*
|
||||
* Aborts an ongoing job.
|
||||
*
|
||||
* \param [in] module_inst Pointer to the ADC software instance struct
|
||||
* \param [in] type Type of job to abort
|
||||
*/
|
||||
void adc_abort_job(
|
||||
struct adc_module *module_inst,
|
||||
enum adc_job_type type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
|
||||
if (type == ADC_JOB_READ_BUFFER) {
|
||||
/* Disable interrupt */
|
||||
adc_disable_interrupt(module_inst, ADC_INTERRUPT_RESULT_READY);
|
||||
/* Mark job as aborted */
|
||||
module_inst->job_status = STATUS_ABORTED;
|
||||
module_inst->remaining_conversions = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,718 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM ADC functionality
|
||||
*
|
||||
* Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip
|
||||
* software and any derivatives exclusively with Microchip products.
|
||||
* It is your responsibility to comply with third party license terms applicable
|
||||
* to your use of third party software (including open source software) that
|
||||
* may accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
|
||||
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
|
||||
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
|
||||
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
|
||||
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
|
||||
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
|
||||
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
|
||||
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
|
||||
*/
|
||||
#ifndef ADC_FEATURE_H_INCLUDED
|
||||
#define ADC_FEATURE_H_INCLUDED
|
||||
|
||||
/**
|
||||
* \addtogroup asfdoc_sam0_adc_group
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if ADC_CALLBACK_MODE == true
|
||||
# include <system_interrupt.h>
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
extern struct adc_module *_adc_instances[ADC_INST_NUM];
|
||||
#endif
|
||||
|
||||
/** Forward definition of the device instance. */
|
||||
struct adc_module;
|
||||
|
||||
/** Type of the callback functions. */
|
||||
typedef void (*adc_callback_t)(struct adc_module *const module);
|
||||
|
||||
/**
|
||||
* \brief ADC Callback enum
|
||||
*
|
||||
* Callback types for ADC callback driver.
|
||||
*
|
||||
*/
|
||||
enum adc_callback {
|
||||
/** Callback for buffer received */
|
||||
ADC_CALLBACK_READ_BUFFER,
|
||||
/** Callback when window is hit */
|
||||
ADC_CALLBACK_WINDOW,
|
||||
/** Callback for error */
|
||||
ADC_CALLBACK_ERROR,
|
||||
# if !defined(__DOXYGEN__)
|
||||
/** Number of available callbacks */
|
||||
ADC_CALLBACK_N,
|
||||
# endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief ADC reference voltage enum
|
||||
*
|
||||
* Enum for the possible reference voltages for the ADC.
|
||||
*
|
||||
*/
|
||||
enum adc_reference {
|
||||
/** 1.0V voltage reference */
|
||||
ADC_REFERENCE_INT1V = ADC_REFCTRL_REFSEL_INT1V,
|
||||
/** 1/1.48V<SUB>CC</SUB> reference */
|
||||
ADC_REFERENCE_INTVCC0 = ADC_REFCTRL_REFSEL_INTVCC0,
|
||||
/** 1/2V<SUB>CC</SUB> (only for internal V<SUB>CC</SUB> > 2.1V) */
|
||||
ADC_REFERENCE_INTVCC1 = ADC_REFCTRL_REFSEL_INTVCC1,
|
||||
/** External reference A */
|
||||
ADC_REFERENCE_AREFA = ADC_REFCTRL_REFSEL_AREFA,
|
||||
/** External reference B */
|
||||
ADC_REFERENCE_AREFB = ADC_REFCTRL_REFSEL_AREFB,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief ADC clock prescaler enum
|
||||
*
|
||||
* Enum for the possible clock prescaler values for the ADC.
|
||||
*
|
||||
*/
|
||||
enum adc_clock_prescaler {
|
||||
/** ADC clock division factor 4 */
|
||||
ADC_CLOCK_PRESCALER_DIV4 = ADC_CTRLB_PRESCALER_DIV4,
|
||||
/** ADC clock division factor 8 */
|
||||
ADC_CLOCK_PRESCALER_DIV8 = ADC_CTRLB_PRESCALER_DIV8,
|
||||
/** ADC clock division factor 16 */
|
||||
ADC_CLOCK_PRESCALER_DIV16 = ADC_CTRLB_PRESCALER_DIV16,
|
||||
/** ADC clock division factor 32 */
|
||||
ADC_CLOCK_PRESCALER_DIV32 = ADC_CTRLB_PRESCALER_DIV32,
|
||||
/** ADC clock division factor 64 */
|
||||
ADC_CLOCK_PRESCALER_DIV64 = ADC_CTRLB_PRESCALER_DIV64,
|
||||
/** ADC clock division factor 128 */
|
||||
ADC_CLOCK_PRESCALER_DIV128 = ADC_CTRLB_PRESCALER_DIV128,
|
||||
/** ADC clock division factor 256 */
|
||||
ADC_CLOCK_PRESCALER_DIV256 = ADC_CTRLB_PRESCALER_DIV256,
|
||||
/** ADC clock division factor 512 */
|
||||
ADC_CLOCK_PRESCALER_DIV512 = ADC_CTRLB_PRESCALER_DIV512,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief ADC resolution enum
|
||||
*
|
||||
* Enum for the possible resolution values for the ADC.
|
||||
*
|
||||
*/
|
||||
enum adc_resolution {
|
||||
/** ADC 12-bit resolution */
|
||||
ADC_RESOLUTION_12BIT = ADC_CTRLB_RESSEL_12BIT,
|
||||
/** ADC 16-bit resolution using oversampling and decimation */
|
||||
ADC_RESOLUTION_16BIT = ADC_CTRLB_RESSEL_16BIT,
|
||||
/** ADC 10-bit resolution */
|
||||
ADC_RESOLUTION_10BIT = ADC_CTRLB_RESSEL_10BIT,
|
||||
/** ADC 8-bit resolution */
|
||||
ADC_RESOLUTION_8BIT = ADC_CTRLB_RESSEL_8BIT,
|
||||
/** ADC 13-bit resolution using oversampling and decimation */
|
||||
ADC_RESOLUTION_13BIT,
|
||||
/** ADC 14-bit resolution using oversampling and decimation */
|
||||
ADC_RESOLUTION_14BIT,
|
||||
/** ADC 15-bit resolution using oversampling and decimation */
|
||||
ADC_RESOLUTION_15BIT,
|
||||
/** ADC 16-bit result register for use with averaging. When using this mode
|
||||
* the ADC result register will be set to 16-bit wide, and the number of
|
||||
* samples to accumulate and the division factor is configured by the
|
||||
* \ref adc_config.accumulate_samples and \ref adc_config.divide_result
|
||||
* members in the configuration struct.
|
||||
*/
|
||||
ADC_RESOLUTION_CUSTOM,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief ADC window monitor mode enum
|
||||
*
|
||||
* Enum for the possible window monitor modes for the ADC.
|
||||
*
|
||||
*/
|
||||
enum adc_window_mode {
|
||||
/** No window mode */
|
||||
ADC_WINDOW_MODE_DISABLE = ADC_WINCTRL_WINMODE_DISABLE,
|
||||
/** RESULT > WINLT */
|
||||
ADC_WINDOW_MODE_ABOVE_LOWER = ADC_WINCTRL_WINMODE_MODE1,
|
||||
/** RESULT < WINUT */
|
||||
ADC_WINDOW_MODE_BELOW_UPPER = ADC_WINCTRL_WINMODE_MODE2,
|
||||
/** WINLT < RESULT < WINUT */
|
||||
ADC_WINDOW_MODE_BETWEEN = ADC_WINCTRL_WINMODE_MODE3,
|
||||
/** !(WINLT < RESULT < WINUT) */
|
||||
ADC_WINDOW_MODE_BETWEEN_INVERTED = ADC_WINCTRL_WINMODE_MODE4,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief ADC gain factor selection enum
|
||||
*
|
||||
* Enum for the possible gain factor values for the ADC.
|
||||
*
|
||||
*/
|
||||
enum adc_gain_factor {
|
||||
/** 1x gain */
|
||||
ADC_GAIN_FACTOR_1X = ADC_INPUTCTRL_GAIN_1X,
|
||||
/** 2x gain */
|
||||
ADC_GAIN_FACTOR_2X = ADC_INPUTCTRL_GAIN_2X,
|
||||
/** 4x gain */
|
||||
ADC_GAIN_FACTOR_4X = ADC_INPUTCTRL_GAIN_4X,
|
||||
/** 8x gain */
|
||||
ADC_GAIN_FACTOR_8X = ADC_INPUTCTRL_GAIN_8X,
|
||||
/** 16x gain */
|
||||
ADC_GAIN_FACTOR_16X = ADC_INPUTCTRL_GAIN_16X,
|
||||
/** 1/2x gain */
|
||||
ADC_GAIN_FACTOR_DIV2 = ADC_INPUTCTRL_GAIN_DIV2,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief ADC event action enum
|
||||
*
|
||||
* Enum for the possible actions to take on an incoming event.
|
||||
*
|
||||
*/
|
||||
enum adc_event_action {
|
||||
/** Event action disabled */
|
||||
ADC_EVENT_ACTION_DISABLED = 0,
|
||||
/** Flush ADC and start conversion */
|
||||
ADC_EVENT_ACTION_FLUSH_START_CONV = ADC_EVCTRL_SYNCEI,
|
||||
/** Start conversion */
|
||||
ADC_EVENT_ACTION_START_CONV = ADC_EVCTRL_STARTEI,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief ADC positive MUX input selection enum
|
||||
*
|
||||
* Enum for the possible positive MUX input selections for the ADC.
|
||||
*
|
||||
*/
|
||||
enum adc_positive_input {
|
||||
/** ADC0 pin */
|
||||
ADC_POSITIVE_INPUT_PIN0 = ADC_INPUTCTRL_MUXPOS_PIN0,
|
||||
/** ADC1 pin */
|
||||
ADC_POSITIVE_INPUT_PIN1 = ADC_INPUTCTRL_MUXPOS_PIN1,
|
||||
/** ADC2 pin */
|
||||
ADC_POSITIVE_INPUT_PIN2 = ADC_INPUTCTRL_MUXPOS_PIN2,
|
||||
/** ADC3 pin */
|
||||
ADC_POSITIVE_INPUT_PIN3 = ADC_INPUTCTRL_MUXPOS_PIN3,
|
||||
/** ADC4 pin */
|
||||
ADC_POSITIVE_INPUT_PIN4 = ADC_INPUTCTRL_MUXPOS_PIN4,
|
||||
/** ADC5 pin */
|
||||
ADC_POSITIVE_INPUT_PIN5 = ADC_INPUTCTRL_MUXPOS_PIN5,
|
||||
/** ADC6 pin */
|
||||
ADC_POSITIVE_INPUT_PIN6 = ADC_INPUTCTRL_MUXPOS_PIN6,
|
||||
/** ADC7 pin */
|
||||
ADC_POSITIVE_INPUT_PIN7 = ADC_INPUTCTRL_MUXPOS_PIN7,
|
||||
/** ADC8 pin */
|
||||
ADC_POSITIVE_INPUT_PIN8 = ADC_INPUTCTRL_MUXPOS_PIN8,
|
||||
/** ADC9 pin */
|
||||
ADC_POSITIVE_INPUT_PIN9 = ADC_INPUTCTRL_MUXPOS_PIN9,
|
||||
/** ADC10 pin */
|
||||
ADC_POSITIVE_INPUT_PIN10 = ADC_INPUTCTRL_MUXPOS_PIN10,
|
||||
/** ADC11 pin */
|
||||
ADC_POSITIVE_INPUT_PIN11 = ADC_INPUTCTRL_MUXPOS_PIN11,
|
||||
/** ADC12 pin */
|
||||
ADC_POSITIVE_INPUT_PIN12 = ADC_INPUTCTRL_MUXPOS_PIN12,
|
||||
/** ADC13 pin */
|
||||
ADC_POSITIVE_INPUT_PIN13 = ADC_INPUTCTRL_MUXPOS_PIN13,
|
||||
/** ADC14 pin */
|
||||
ADC_POSITIVE_INPUT_PIN14 = ADC_INPUTCTRL_MUXPOS_PIN14,
|
||||
/** ADC15 pin */
|
||||
ADC_POSITIVE_INPUT_PIN15 = ADC_INPUTCTRL_MUXPOS_PIN15,
|
||||
/** ADC16 pin */
|
||||
ADC_POSITIVE_INPUT_PIN16 = ADC_INPUTCTRL_MUXPOS_PIN16,
|
||||
/** ADC17 pin */
|
||||
ADC_POSITIVE_INPUT_PIN17 = ADC_INPUTCTRL_MUXPOS_PIN17,
|
||||
/** ADC18 pin */
|
||||
ADC_POSITIVE_INPUT_PIN18 = ADC_INPUTCTRL_MUXPOS_PIN18,
|
||||
/** ADC19 pin */
|
||||
ADC_POSITIVE_INPUT_PIN19 = ADC_INPUTCTRL_MUXPOS_PIN19,
|
||||
/** Temperature reference */
|
||||
ADC_POSITIVE_INPUT_TEMP = ADC_INPUTCTRL_MUXPOS_TEMP,
|
||||
/** Bandgap voltage */
|
||||
ADC_POSITIVE_INPUT_BANDGAP = ADC_INPUTCTRL_MUXPOS_BANDGAP,
|
||||
/** 1/4 scaled core supply */
|
||||
ADC_POSITIVE_INPUT_SCALEDCOREVCC = ADC_INPUTCTRL_MUXPOS_SCALEDCOREVCC,
|
||||
/** 1/4 scaled I/O supply */
|
||||
ADC_POSITIVE_INPUT_SCALEDIOVCC = ADC_INPUTCTRL_MUXPOS_SCALEDIOVCC,
|
||||
/** DAC input */
|
||||
ADC_POSITIVE_INPUT_DAC = ADC_INPUTCTRL_MUXPOS_DAC,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief ADC negative Multiplexer(MUX) input selection enum
|
||||
*
|
||||
* Enum for the possible negative Multiplexer(MUX) input selections for the ADC.
|
||||
*
|
||||
*/
|
||||
enum adc_negative_input {
|
||||
/** ADC0 pin */
|
||||
ADC_NEGATIVE_INPUT_PIN0 = ADC_INPUTCTRL_MUXNEG_PIN0,
|
||||
/** ADC1 pin */
|
||||
ADC_NEGATIVE_INPUT_PIN1 = ADC_INPUTCTRL_MUXNEG_PIN1,
|
||||
/** ADC2 pin */
|
||||
ADC_NEGATIVE_INPUT_PIN2 = ADC_INPUTCTRL_MUXNEG_PIN2,
|
||||
/** ADC3 pin */
|
||||
ADC_NEGATIVE_INPUT_PIN3 = ADC_INPUTCTRL_MUXNEG_PIN3,
|
||||
/** ADC4 pin */
|
||||
ADC_NEGATIVE_INPUT_PIN4 = ADC_INPUTCTRL_MUXNEG_PIN4,
|
||||
/** ADC5 pin */
|
||||
ADC_NEGATIVE_INPUT_PIN5 = ADC_INPUTCTRL_MUXNEG_PIN5,
|
||||
/** ADC6 pin */
|
||||
ADC_NEGATIVE_INPUT_PIN6 = ADC_INPUTCTRL_MUXNEG_PIN6,
|
||||
/** ADC7 pin */
|
||||
ADC_NEGATIVE_INPUT_PIN7 = ADC_INPUTCTRL_MUXNEG_PIN7,
|
||||
/** Internal ground */
|
||||
ADC_NEGATIVE_INPUT_GND = ADC_INPUTCTRL_MUXNEG_GND,
|
||||
/** I/O ground */
|
||||
ADC_NEGATIVE_INPUT_IOGND = ADC_INPUTCTRL_MUXNEG_IOGND,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief ADC number of accumulated samples enum
|
||||
*
|
||||
* Enum for the possible numbers of ADC samples to accumulate.
|
||||
* This setting is only used when the \ref ADC_RESOLUTION_CUSTOM
|
||||
* resolution setting is used.
|
||||
*
|
||||
*/
|
||||
enum adc_accumulate_samples {
|
||||
/** No averaging */
|
||||
ADC_ACCUMULATE_DISABLE = ADC_AVGCTRL_SAMPLENUM_1,
|
||||
/** Average 2 samples */
|
||||
ADC_ACCUMULATE_SAMPLES_2 = ADC_AVGCTRL_SAMPLENUM_2,
|
||||
/** Average 4 samples */
|
||||
ADC_ACCUMULATE_SAMPLES_4 = ADC_AVGCTRL_SAMPLENUM_4,
|
||||
/** Average 8 samples */
|
||||
ADC_ACCUMULATE_SAMPLES_8 = ADC_AVGCTRL_SAMPLENUM_8,
|
||||
/** Average 16 samples */
|
||||
ADC_ACCUMULATE_SAMPLES_16 = ADC_AVGCTRL_SAMPLENUM_16,
|
||||
/** Average 32 samples */
|
||||
ADC_ACCUMULATE_SAMPLES_32 = ADC_AVGCTRL_SAMPLENUM_32,
|
||||
/** Average 64 samples */
|
||||
ADC_ACCUMULATE_SAMPLES_64 = ADC_AVGCTRL_SAMPLENUM_64,
|
||||
/** Average 128 samples */
|
||||
ADC_ACCUMULATE_SAMPLES_128 = ADC_AVGCTRL_SAMPLENUM_128,
|
||||
/** Average 256 samples */
|
||||
ADC_ACCUMULATE_SAMPLES_256 = ADC_AVGCTRL_SAMPLENUM_256,
|
||||
/** Average 512 samples */
|
||||
ADC_ACCUMULATE_SAMPLES_512 = ADC_AVGCTRL_SAMPLENUM_512,
|
||||
/** Average 1024 samples */
|
||||
ADC_ACCUMULATE_SAMPLES_1024 = ADC_AVGCTRL_SAMPLENUM_1024,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief ADC possible dividers for the result register
|
||||
*
|
||||
* Enum for the possible division factors to use when accumulating
|
||||
* multiple samples. To keep the same resolution for the averaged
|
||||
* result and the actual input value, the division factor must
|
||||
* be equal to the number of samples accumulated. This setting is only
|
||||
* used when the \ref ADC_RESOLUTION_CUSTOM resolution setting is used.
|
||||
*/
|
||||
enum adc_divide_result {
|
||||
/** Don't divide result register after accumulation */
|
||||
ADC_DIVIDE_RESULT_DISABLE = 0,
|
||||
/** Divide result register by 2 after accumulation */
|
||||
ADC_DIVIDE_RESULT_2 = 1,
|
||||
/** Divide result register by 4 after accumulation */
|
||||
ADC_DIVIDE_RESULT_4 = 2,
|
||||
/** Divide result register by 8 after accumulation */
|
||||
ADC_DIVIDE_RESULT_8 = 3,
|
||||
/** Divide result register by 16 after accumulation */
|
||||
ADC_DIVIDE_RESULT_16 = 4,
|
||||
/** Divide result register by 32 after accumulation */
|
||||
ADC_DIVIDE_RESULT_32 = 5,
|
||||
/** Divide result register by 64 after accumulation */
|
||||
ADC_DIVIDE_RESULT_64 = 6,
|
||||
/** Divide result register by 128 after accumulation */
|
||||
ADC_DIVIDE_RESULT_128 = 7,
|
||||
};
|
||||
|
||||
#if ADC_CALLBACK_MODE == true
|
||||
/**
|
||||
* Enum for the possible ADC interrupt flags.
|
||||
*/
|
||||
enum adc_interrupt_flag {
|
||||
/** ADC result ready */
|
||||
ADC_INTERRUPT_RESULT_READY = ADC_INTFLAG_RESRDY,
|
||||
/** Window monitor match */
|
||||
ADC_INTERRUPT_WINDOW = ADC_INTFLAG_WINMON,
|
||||
/** ADC result overwritten before read */
|
||||
ADC_INTERRUPT_OVERRUN = ADC_INTFLAG_OVERRUN,
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief ADC oversampling and decimation enum
|
||||
*
|
||||
* Enum for the possible numbers of bits resolution can be increased by when
|
||||
* using oversampling and decimation.
|
||||
*
|
||||
*/
|
||||
enum adc_oversampling_and_decimation {
|
||||
/** Don't use oversampling and decimation mode */
|
||||
ADC_OVERSAMPLING_AND_DECIMATION_DISABLE = 0,
|
||||
/** 1-bit resolution increase */
|
||||
ADC_OVERSAMPLING_AND_DECIMATION_1BIT,
|
||||
/** 2-bit resolution increase */
|
||||
ADC_OVERSAMPLING_AND_DECIMATION_2BIT,
|
||||
/** 3-bit resolution increase */
|
||||
ADC_OVERSAMPLING_AND_DECIMATION_3BIT,
|
||||
/** 4-bit resolution increase */
|
||||
ADC_OVERSAMPLING_AND_DECIMATION_4BIT
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Window monitor configuration structure
|
||||
*
|
||||
* Window monitor configuration structure.
|
||||
*/
|
||||
struct adc_window_config {
|
||||
/** Selected window mode */
|
||||
enum adc_window_mode window_mode;
|
||||
/** Lower window value */
|
||||
int32_t window_lower_value;
|
||||
/** Upper window value */
|
||||
int32_t window_upper_value;
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief ADC event enable/disable structure.
|
||||
*
|
||||
* Event flags for the ADC module. This is used to enable and
|
||||
* disable events via \ref adc_enable_events() and \ref adc_disable_events().
|
||||
*/
|
||||
struct adc_events {
|
||||
/** Enable event generation on conversion done */
|
||||
bool generate_event_on_conversion_done;
|
||||
/** Enable event generation on window monitor */
|
||||
bool generate_event_on_window_monitor;
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Gain and offset correction configuration structure
|
||||
*
|
||||
* Gain and offset correction configuration structure.
|
||||
* Part of the \ref adc_config struct and will be initialized by
|
||||
* \ref adc_get_config_defaults.
|
||||
*/
|
||||
struct adc_correction_config {
|
||||
/**
|
||||
* Enables correction for gain and offset based on values of gain_correction and
|
||||
* offset_correction if set to true
|
||||
*/
|
||||
bool correction_enable;
|
||||
/**
|
||||
* This value defines how the ADC conversion result is compensated for gain
|
||||
* error before written to the result register. This is a fractional value,
|
||||
* 1-bit integer plus an 11-bit fraction, therefore
|
||||
* 1/2 <= gain_correction < 2. Valid \c gain_correction values ranges from
|
||||
* \c 0b010000000000 to \c 0b111111111111.
|
||||
*/
|
||||
uint16_t gain_correction;
|
||||
/**
|
||||
* This value defines how the ADC conversion result is compensated for
|
||||
* offset error before written to the result register. This is a 12-bit
|
||||
* value in two's complement format.
|
||||
*/
|
||||
int16_t offset_correction;
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Pin scan configuration structure
|
||||
*
|
||||
* Pin scan configuration structure. Part of the \ref adc_config struct and will
|
||||
* be initialized by \ref adc_get_config_defaults.
|
||||
*/
|
||||
struct adc_pin_scan_config {
|
||||
/**
|
||||
* Offset (relative to selected positive input) of the first input pin to be
|
||||
* used in pin scan mode
|
||||
*/
|
||||
uint8_t offset_start_scan;
|
||||
/**
|
||||
* Number of input pins to scan in pin scan mode. A value below two will
|
||||
* disable pin scan mode.
|
||||
*/
|
||||
uint8_t inputs_to_scan;
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief ADC configuration structure
|
||||
*
|
||||
* Configuration structure for an ADC instance. This structure should be
|
||||
* initialized by the \ref adc_get_config_defaults()
|
||||
* function before being modified by the user application.
|
||||
*/
|
||||
struct adc_config {
|
||||
/** GCLK generator used to clock the peripheral */
|
||||
enum gclk_generator clock_source;
|
||||
/** Voltage reference */
|
||||
enum adc_reference reference;
|
||||
/** Clock prescaler */
|
||||
enum adc_clock_prescaler clock_prescaler;
|
||||
/** Result resolution */
|
||||
enum adc_resolution resolution;
|
||||
/** Gain factor */
|
||||
enum adc_gain_factor gain_factor;
|
||||
/** Positive Multiplexer (MUX) input */
|
||||
enum adc_positive_input positive_input;
|
||||
/** Negative MUX input. For singled-ended conversion mode, the negative
|
||||
* input must be connected to ground. This ground could be the internal
|
||||
* GND, IOGND or an external ground connected to a pin. */
|
||||
enum adc_negative_input negative_input;
|
||||
/** Number of ADC samples to accumulate when using the
|
||||
* \c ADC_RESOLUTION_CUSTOM mode. Note: if the result width increases,
|
||||
* result resolution will be changed accordingly.
|
||||
*/
|
||||
enum adc_accumulate_samples accumulate_samples;
|
||||
/** Division ration when using the ADC_RESOLUTION_CUSTOM mode */
|
||||
enum adc_divide_result divide_result;
|
||||
/** Left adjusted result */
|
||||
bool left_adjust;
|
||||
/** Enables differential mode if true.
|
||||
* if false, ADC will run in singled-ended mode. */
|
||||
bool differential_mode;
|
||||
/** Enables free running mode if true */
|
||||
bool freerunning;
|
||||
/** Enables ADC in standby sleep mode if true */
|
||||
bool run_in_standby;
|
||||
/**
|
||||
* Enables reference buffer offset compensation if true.
|
||||
* This will increase the accuracy of the gain stage, but decreases the input
|
||||
* impedance; therefore the startup time of the reference must be increased.
|
||||
*/
|
||||
bool reference_compensation_enable;
|
||||
/**
|
||||
* This value (0-63) control the ADC sampling time in number of half ADC
|
||||
* prescaled clock cycles (depends of \c ADC_PRESCALER value), thus
|
||||
* controlling the ADC input impedance. Sampling time is set according to
|
||||
* the formula:
|
||||
* Sample time = (sample_length+1) * (ADCclk / 2).
|
||||
*/
|
||||
uint8_t sample_length;
|
||||
/** Window monitor configuration structure */
|
||||
struct adc_window_config window;
|
||||
/** Gain and offset correction configuration structure */
|
||||
struct adc_correction_config correction;
|
||||
/** Event action to take on incoming event */
|
||||
enum adc_event_action event_action;
|
||||
/** Pin scan configuration structure */
|
||||
struct adc_pin_scan_config pin_scan;
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief ADC software device instance structure.
|
||||
*
|
||||
* ADC software instance structure, used to retain software state information
|
||||
* of an associated hardware module instance.
|
||||
*
|
||||
* \note The fields of this structure should not be altered by the user
|
||||
* application; they are reserved for module-internal use only.
|
||||
*/
|
||||
struct adc_module {
|
||||
#if !defined(__DOXYGEN__)
|
||||
/** Pointer to ADC hardware module */
|
||||
Adc *hw;
|
||||
/** Keep reference configuration so we know when enable is called */
|
||||
enum adc_reference reference;
|
||||
# if ADC_CALLBACK_MODE == true
|
||||
/** Array to store callback functions */
|
||||
adc_callback_t callback[ADC_CALLBACK_N];
|
||||
/** Pointer to buffer used for ADC results */
|
||||
volatile uint16_t *job_buffer;
|
||||
/** Remaining number of conversions in current job */
|
||||
volatile uint16_t remaining_conversions;
|
||||
/** Bit mask for callbacks registered */
|
||||
uint8_t registered_callback_mask;
|
||||
/** Bit mask for callbacks enabled */
|
||||
uint8_t enabled_callback_mask;
|
||||
/** Holds the status of the ongoing or last conversion job */
|
||||
volatile enum status_code job_status;
|
||||
/** If software triggering is needed */
|
||||
bool software_trigger;
|
||||
# endif
|
||||
#endif
|
||||
};
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
|
||||
/**
|
||||
* \brief Determines if the hardware module(s) are currently synchronizing to the bus.
|
||||
*
|
||||
* Checks to see if the underlying hardware peripheral module(s) are currently
|
||||
* synchronizing across multiple clock domains to the hardware bus. This
|
||||
* function can be used to delay further operations on a module until such time
|
||||
* that it is ready, to prevent blocking delays for synchronization in the
|
||||
* user application.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the ADC software instance struct
|
||||
*
|
||||
* \return Synchronization status of the underlying hardware module(s).
|
||||
*
|
||||
* \retval true if the module synchronization is ongoing
|
||||
* \retval false if the module has completed synchronization
|
||||
*/
|
||||
static inline bool adc_is_syncing(
|
||||
struct adc_module *const module_inst)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
|
||||
Adc *const adc_module = module_inst->hw;
|
||||
|
||||
if (adc_module->STATUS.reg & ADC_STATUS_SYNCBUSY) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \name ADC Gain and Pin Scan Mode
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Sets ADC gain factor
|
||||
*
|
||||
* Sets the ADC gain factor to a specified gain setting.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the ADC software instance struct
|
||||
* \param[in] gain_factor Gain factor value to set
|
||||
*/
|
||||
static inline void adc_set_gain(
|
||||
struct adc_module *const module_inst,
|
||||
const enum adc_gain_factor gain_factor)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
|
||||
Adc *const adc_module = module_inst->hw;
|
||||
|
||||
while (adc_is_syncing(module_inst)) {
|
||||
/* Wait for synchronization */
|
||||
}
|
||||
|
||||
/* Set new gain factor */
|
||||
adc_module->INPUTCTRL.reg =
|
||||
(adc_module->INPUTCTRL.reg & ~ADC_INPUTCTRL_GAIN_Msk) |
|
||||
(gain_factor);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Sets the ADC pin scan mode
|
||||
*
|
||||
* Configures the pin scan mode of the ADC module. In pin scan mode, the first
|
||||
* conversion will start at the configured positive input + start_offset. When
|
||||
* a conversion is done, a conversion will start on the next input, until
|
||||
* \c inputs_to_scan number of conversions are made.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the ADC software instance struct
|
||||
* \param[in] inputs_to_scan Number of input pins to perform a conversion on
|
||||
* (must be two or more)
|
||||
* \param[in] start_offset Offset of first pin to scan (relative to
|
||||
* configured positive input)
|
||||
*
|
||||
* \return Status of the pin scan configuration set request.
|
||||
*
|
||||
* \retval STATUS_OK Pin scan mode has been set successfully
|
||||
* \retval STATUS_ERR_INVALID_ARG Number of input pins to scan or offset has
|
||||
* an invalid value
|
||||
*/
|
||||
static inline enum status_code adc_set_pin_scan_mode(
|
||||
struct adc_module *const module_inst,
|
||||
uint8_t inputs_to_scan,
|
||||
const uint8_t start_offset)
|
||||
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
|
||||
Adc *const adc_module = module_inst->hw;
|
||||
|
||||
if (inputs_to_scan > 0) {
|
||||
/*
|
||||
* Number of input sources included is the value written to INPUTSCAN
|
||||
* plus 1.
|
||||
*/
|
||||
inputs_to_scan--;
|
||||
}
|
||||
|
||||
if (inputs_to_scan > (ADC_INPUTCTRL_INPUTSCAN_Msk >> ADC_INPUTCTRL_INPUTSCAN_Pos) ||
|
||||
start_offset > (ADC_INPUTCTRL_INPUTOFFSET_Msk >> ADC_INPUTCTRL_INPUTOFFSET_Pos)) {
|
||||
/* Invalid number of input pins */
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
while (adc_is_syncing(module_inst)) {
|
||||
/* Wait for synchronization */
|
||||
}
|
||||
|
||||
/* Set pin scan mode */
|
||||
adc_module->INPUTCTRL.reg =
|
||||
(adc_module->INPUTCTRL.reg &
|
||||
~(ADC_INPUTCTRL_INPUTSCAN_Msk | ADC_INPUTCTRL_INPUTOFFSET_Msk)) |
|
||||
(start_offset << ADC_INPUTCTRL_INPUTOFFSET_Pos) |
|
||||
(inputs_to_scan << ADC_INPUTCTRL_INPUTSCAN_Pos);
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Disables pin scan mode
|
||||
*
|
||||
* Disables pin scan mode. The next conversion will be made on only one pin
|
||||
* (the configured positive input pin).
|
||||
*
|
||||
* \param[in] module_inst Pointer to the ADC software instance struct
|
||||
*/
|
||||
static inline void adc_disable_pin_scan_mode(
|
||||
struct adc_module *const module_inst)
|
||||
{
|
||||
/* Disable pin scan mode */
|
||||
adc_set_pin_scan_mode(module_inst, 0, 0);
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* ADC_FEATURE_H_INCLUDED */
|
||||
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM Peripheral Digital-to-Analog Converter Driver
|
||||
*
|
||||
* Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip
|
||||
* software and any derivatives exclusively with Microchip products.
|
||||
* It is your responsibility to comply with third party license terms applicable
|
||||
* to your use of third party software (including open source software) that
|
||||
* may accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
|
||||
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
|
||||
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
|
||||
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
|
||||
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
|
||||
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
|
||||
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
|
||||
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
|
||||
*/
|
||||
#ifndef DAC_H_INCLUDED
|
||||
#define DAC_H_INCLUDED
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <compiler.h>
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
/**
|
||||
* \addtogroup asfdoc_sam0_dac_group
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Define DAC features set according to different device families.
|
||||
* @{
|
||||
*/
|
||||
#if (SAMD21 || SAMD10 || SAMD11 || SAMDA1 || SAMHA1 || SAMHA0)
|
||||
# define FEATURE_DAC_DATABUF_WRITE_PROTECTION
|
||||
#endif
|
||||
/**@}*/
|
||||
|
||||
#ifndef DAC_TIMEOUT
|
||||
# define DAC_TIMEOUT 0xFFFF
|
||||
#endif
|
||||
|
||||
#if DAC_CALLBACK_MODE == true
|
||||
# include <system_interrupt.h>
|
||||
|
||||
/** Forward definition of the device instance. */
|
||||
struct dac_module;
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
extern struct dac_module *_dac_instances[DAC_INST_NUM];
|
||||
#endif
|
||||
|
||||
/** Type definition for a DAC module callback function. */
|
||||
typedef void (*dac_callback_t)(uint8_t channel);
|
||||
|
||||
/** Enum for the possible callback types for the DAC module. */
|
||||
enum dac_callback {
|
||||
/** Callback type for when a DAC channel data empty condition occurs
|
||||
* (requires event triggered mode) */
|
||||
DAC_CALLBACK_DATA_EMPTY,
|
||||
|
||||
/** Callback type for when a DAC channel data underrun condition occurs
|
||||
* (requires event triggered mode) */
|
||||
DAC_CALLBACK_DATA_UNDERRUN,
|
||||
|
||||
/** Callback type for when a DAC channel write buffer job complete (requires
|
||||
* event triggered mode) */
|
||||
DAC_CALLBACK_TRANSFER_COMPLETE,
|
||||
#if !defined(__DOXYGEN__)
|
||||
DAC_CALLBACK_N,
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#include <dac_feature.h>
|
||||
|
||||
/**
|
||||
* \name Configuration and Initialization
|
||||
* @{
|
||||
*/
|
||||
|
||||
bool dac_is_syncing(
|
||||
struct dac_module *const dev_inst);
|
||||
|
||||
void dac_get_config_defaults(
|
||||
struct dac_config *const config);
|
||||
|
||||
enum status_code dac_init(
|
||||
struct dac_module *const dev_inst,
|
||||
Dac *const module,
|
||||
struct dac_config *const config);
|
||||
|
||||
void dac_reset(
|
||||
struct dac_module *const dev_inst);
|
||||
|
||||
void dac_enable(
|
||||
struct dac_module *const dev_inst);
|
||||
|
||||
void dac_disable(
|
||||
struct dac_module *const dev_inst);
|
||||
|
||||
void dac_enable_events(
|
||||
struct dac_module *const module_inst,
|
||||
struct dac_events *const events);
|
||||
|
||||
void dac_disable_events(
|
||||
struct dac_module *const module_inst,
|
||||
struct dac_events *const events);
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name Configuration and Initialization (Channel)
|
||||
* @{
|
||||
*/
|
||||
|
||||
void dac_chan_get_config_defaults(
|
||||
struct dac_chan_config *const config);
|
||||
|
||||
void dac_chan_set_config(
|
||||
struct dac_module *const dev_inst,
|
||||
const enum dac_channel channel,
|
||||
struct dac_chan_config *const config);
|
||||
|
||||
void dac_chan_enable(
|
||||
struct dac_module *const dev_inst,
|
||||
enum dac_channel channel);
|
||||
|
||||
void dac_chan_disable(
|
||||
struct dac_module *const dev_inst,
|
||||
enum dac_channel channel);
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name Channel Data Management
|
||||
* @{
|
||||
*/
|
||||
|
||||
enum status_code dac_chan_write(
|
||||
struct dac_module *const dev_inst,
|
||||
enum dac_channel channel,
|
||||
const uint16_t data);
|
||||
|
||||
enum status_code dac_chan_write_buffer_wait(
|
||||
struct dac_module *const module_inst,
|
||||
enum dac_channel channel,
|
||||
uint16_t *buffer,
|
||||
uint32_t length);
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name Status Management
|
||||
* @{
|
||||
*/
|
||||
uint32_t dac_get_status(
|
||||
struct dac_module *const module_inst);
|
||||
void dac_clear_status(
|
||||
struct dac_module *const module_inst,
|
||||
uint32_t status_flags);
|
||||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
#endif /* DAC_H_INCLUDED */
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM Digital-to-Analog Interrupt Driver
|
||||
*
|
||||
* Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip
|
||||
* software and any derivatives exclusively with Microchip products.
|
||||
* It is your responsibility to comply with third party license terms applicable
|
||||
* to your use of third party software (including open source software) that
|
||||
* may accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
|
||||
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
|
||||
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
|
||||
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
|
||||
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
|
||||
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
|
||||
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
|
||||
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
|
||||
*/
|
||||
#ifndef DAC_CALLBACK_H_INCLUDED
|
||||
#define DAC_CALLBACK_H_INCLUDED
|
||||
|
||||
#include <compiler.h>
|
||||
#include "dac.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup asfdoc_sam0_dac_group
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** \name Callback Configuration and Initialization
|
||||
* @{
|
||||
*/
|
||||
enum status_code dac_chan_write_buffer_job(
|
||||
struct dac_module *const module_inst,
|
||||
const enum dac_channel channel,
|
||||
uint16_t *buffer,
|
||||
uint32_t buffer_size);
|
||||
|
||||
enum status_code dac_chan_write_job(
|
||||
struct dac_module *const module_inst,
|
||||
const enum dac_channel channel,
|
||||
uint16_t data);
|
||||
|
||||
enum status_code dac_register_callback(
|
||||
struct dac_module *const module,
|
||||
const enum dac_channel channel,
|
||||
const dac_callback_t callback,
|
||||
const enum dac_callback type);
|
||||
|
||||
enum status_code dac_unregister_callback(
|
||||
struct dac_module *const module,
|
||||
const enum dac_channel channel,
|
||||
const enum dac_callback type);
|
||||
|
||||
/** @} */
|
||||
|
||||
/** \name Callback Enabling and Disabling (Channel)
|
||||
* @{
|
||||
*/
|
||||
|
||||
enum status_code dac_chan_enable_callback(
|
||||
struct dac_module *const module,
|
||||
const enum dac_channel channel,
|
||||
const enum dac_callback type);
|
||||
|
||||
enum status_code dac_chan_disable_callback(
|
||||
struct dac_module *const module,
|
||||
const enum dac_channel channel,
|
||||
const enum dac_callback type);
|
||||
|
||||
enum status_code dac_chan_get_job_status(
|
||||
struct dac_module *module_inst,
|
||||
const enum dac_channel channel);
|
||||
|
||||
void dac_chan_abort_job(
|
||||
struct dac_module *module_inst,
|
||||
const enum dac_channel channel);
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,769 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM Peripheral Digital-to-Analog Converter Driver
|
||||
*
|
||||
* Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip
|
||||
* software and any derivatives exclusively with Microchip products.
|
||||
* It is your responsibility to comply with third party license terms applicable
|
||||
* to your use of third party software (including open source software) that
|
||||
* may accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
|
||||
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
|
||||
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
|
||||
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
|
||||
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
|
||||
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
|
||||
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
|
||||
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
|
||||
*/
|
||||
#include "dac.h"
|
||||
#include <system.h>
|
||||
#include <pinmux.h>
|
||||
|
||||
/**
|
||||
* \internal Writes a DAC configuration to the hardware module.
|
||||
*
|
||||
* Writes out a given configuration to the hardware module.
|
||||
*
|
||||
* \param[out] module_inst Pointer to the DAC software instance struct
|
||||
* \param[in] config Pointer to the configuration struct
|
||||
*
|
||||
*/
|
||||
static void _dac_set_config(
|
||||
struct dac_module *const module_inst,
|
||||
struct dac_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(config);
|
||||
Assert(module_inst->hw);
|
||||
|
||||
Dac *const dac_module = module_inst->hw;
|
||||
|
||||
/* Set selected DAC output to be enabled when enabling the module */
|
||||
module_inst->output = config->output;
|
||||
module_inst->start_on_event = false;
|
||||
|
||||
uint32_t new_ctrla = 0;
|
||||
uint32_t new_ctrlb = 0;
|
||||
|
||||
/* Enable DAC in standby sleep mode if configured */
|
||||
if (config->run_in_standby) {
|
||||
new_ctrla |= DAC_CTRLA_RUNSTDBY;
|
||||
}
|
||||
|
||||
/* Set reference voltage */
|
||||
new_ctrlb |= config->reference;
|
||||
|
||||
/* Left adjust data if configured */
|
||||
if (config->left_adjust) {
|
||||
new_ctrlb |= DAC_CTRLB_LEFTADJ;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_DAC_DATABUF_WRITE_PROTECTION
|
||||
/* Bypass DATABUF write protection if configured */
|
||||
if (config->databuf_protection_bypass) {
|
||||
new_ctrlb |= DAC_CTRLB_BDWP;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Voltage pump disable if configured */
|
||||
if (config->voltage_pump_disable) {
|
||||
new_ctrlb |= DAC_CTRLB_VPD;
|
||||
}
|
||||
|
||||
/* Apply the new configuration to the hardware module */
|
||||
dac_module->CTRLA.reg = new_ctrla;
|
||||
|
||||
while (dac_is_syncing(module_inst)) {
|
||||
/* Wait until the synchronization is complete */
|
||||
}
|
||||
|
||||
dac_module->CTRLB.reg = new_ctrlb;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Determines if the hardware module(s) are currently synchronizing to the bus.
|
||||
*
|
||||
* Checks to see if the underlying hardware peripheral module(s) are currently
|
||||
* synchronizing across multiple clock domains to the hardware bus. This
|
||||
* function can be used to delay further operations on a module until such time
|
||||
* that it is ready, to prevent blocking delays for synchronization in the
|
||||
* user application.
|
||||
*
|
||||
* \param[in] dev_inst Pointer to the DAC software instance struct
|
||||
*
|
||||
* \return Synchronization status of the underlying hardware module(s).
|
||||
*
|
||||
* \retval true If the module synchronization is ongoing
|
||||
* \retval false If the module has completed synchronization
|
||||
*/
|
||||
bool dac_is_syncing(
|
||||
struct dac_module *const dev_inst)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(dev_inst);
|
||||
|
||||
Dac *const dac_module = dev_inst->hw;
|
||||
|
||||
#if (SAMC21)
|
||||
if (dac_module->SYNCBUSY.reg) {
|
||||
#else
|
||||
if (dac_module->STATUS.reg & DAC_STATUS_SYNCBUSY) {
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Initializes a DAC configuration structure to defaults.
|
||||
*
|
||||
* Initializes a given DAC configuration structure to a set of
|
||||
* known default values. This function should be called on any new
|
||||
* instance of the configuration structures before being modified by the
|
||||
* user application.
|
||||
*
|
||||
* The default configuration is as follows:
|
||||
* \li 1V from internal bandgap reference
|
||||
* \li Drive the DAC output to the VOUT pin
|
||||
* \li Right adjust data
|
||||
* \li GCLK generator 0 (GCLK main) clock source
|
||||
* \li The output buffer is disabled when the chip enters STANDBY sleep
|
||||
* mode
|
||||
*
|
||||
* \param[out] config Configuration structure to initialize to default values
|
||||
*/
|
||||
void dac_get_config_defaults(
|
||||
struct dac_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(config);
|
||||
|
||||
/* Default configuration values */
|
||||
config->reference = DAC_REFERENCE_INT1V;
|
||||
config->output = DAC_OUTPUT_EXTERNAL;
|
||||
config->left_adjust = false;
|
||||
#ifdef FEATURE_DAC_DATABUF_WRITE_PROTECTION
|
||||
config->databuf_protection_bypass = false;
|
||||
#endif
|
||||
config->voltage_pump_disable = false;
|
||||
config->clock_source = GCLK_GENERATOR_0;
|
||||
config->run_in_standby = false;
|
||||
#if (SAMC21)
|
||||
config->dither_mode = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Initialize the DAC device struct.
|
||||
*
|
||||
* Use this function to initialize the Digital to Analog Converter. Resets the
|
||||
* underlying hardware module and configures it.
|
||||
*
|
||||
* \note The DAC channel must be configured separately.
|
||||
*
|
||||
* \param[out] module_inst Pointer to the DAC software instance struct
|
||||
* \param[in] module Pointer to the DAC module instance
|
||||
* \param[in] config Pointer to the config struct, created by the user
|
||||
* application
|
||||
*
|
||||
* \return Status of initialization.
|
||||
* \retval STATUS_OK Module initiated correctly
|
||||
* \retval STATUS_ERR_DENIED If module is enabled
|
||||
* \retval STATUS_BUSY If module is busy resetting
|
||||
*/
|
||||
enum status_code dac_init(
|
||||
struct dac_module *const module_inst,
|
||||
Dac *const module,
|
||||
struct dac_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module);
|
||||
Assert(config);
|
||||
|
||||
/* Initialize device instance */
|
||||
module_inst->hw = module;
|
||||
|
||||
/* Turn on the digital interface clock */
|
||||
#if (SAMC21)
|
||||
system_apb_clock_set_mask(SYSTEM_CLOCK_APB_APBC, MCLK_APBCMASK_DAC);
|
||||
#else
|
||||
system_apb_clock_set_mask(SYSTEM_CLOCK_APB_APBC, PM_APBCMASK_DAC);
|
||||
#endif
|
||||
|
||||
/* Check if module is enabled. */
|
||||
if (module->CTRLA.reg & DAC_CTRLA_ENABLE) {
|
||||
return STATUS_ERR_DENIED;
|
||||
}
|
||||
|
||||
/* Check if reset is in progress. */
|
||||
if (module->CTRLA.reg & DAC_CTRLA_SWRST) {
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
|
||||
/* Configure GCLK channel and enable clock */
|
||||
struct system_gclk_chan_config gclk_chan_conf;
|
||||
system_gclk_chan_get_config_defaults(&gclk_chan_conf);
|
||||
gclk_chan_conf.source_generator = config->clock_source;
|
||||
system_gclk_chan_set_config(DAC_GCLK_ID, &gclk_chan_conf);
|
||||
system_gclk_chan_enable(DAC_GCLK_ID);
|
||||
|
||||
/* MUX the DAC VOUT pin */
|
||||
struct system_pinmux_config pin_conf;
|
||||
system_pinmux_get_config_defaults(&pin_conf);
|
||||
|
||||
/* Set up the DAC VOUT pin */
|
||||
pin_conf.mux_position = MUX_PA02B_DAC_VOUT;
|
||||
pin_conf.direction = SYSTEM_PINMUX_PIN_DIR_INPUT;
|
||||
pin_conf.input_pull = SYSTEM_PINMUX_PIN_PULL_NONE;
|
||||
system_pinmux_pin_set_config(PIN_PA02B_DAC_VOUT, &pin_conf);
|
||||
|
||||
/* Write configuration to module */
|
||||
_dac_set_config(module_inst, config);
|
||||
|
||||
/* Store reference selection for later use */
|
||||
module_inst->reference = config->reference;
|
||||
|
||||
#if DAC_CALLBACK_MODE == true
|
||||
for (uint8_t i = 0; i < DAC_CALLBACK_N; i++) {
|
||||
module_inst->callback[i] = NULL;
|
||||
};
|
||||
|
||||
_dac_instances[0] = module_inst;
|
||||
#endif
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Resets the DAC module.
|
||||
*
|
||||
* This function will reset the DAC module to its power on default values and
|
||||
* disable it.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software instance struct
|
||||
*/
|
||||
void dac_reset(
|
||||
struct dac_module *const module_inst)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
|
||||
Dac *const dac_module = module_inst->hw;
|
||||
|
||||
while (dac_is_syncing(module_inst)) {
|
||||
/* Wait until the synchronization is complete */
|
||||
}
|
||||
|
||||
/* Software reset the module */
|
||||
dac_module->CTRLA.reg |= DAC_CTRLA_SWRST;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Enable the DAC module.
|
||||
*
|
||||
* Enables the DAC interface and the selected output. If any internal reference
|
||||
* is selected it will be enabled.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software instance struct
|
||||
*
|
||||
*/
|
||||
void dac_enable(
|
||||
struct dac_module *const module_inst)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
|
||||
Dac *const dac_module = module_inst->hw;
|
||||
|
||||
/* Enable selected output */
|
||||
dac_module->CTRLB.reg |= module_inst->output;
|
||||
|
||||
while (dac_is_syncing(module_inst)) {
|
||||
/* Wait until the synchronization is complete */
|
||||
}
|
||||
|
||||
/* Enable the module */
|
||||
dac_module->CTRLA.reg |= DAC_CTRLA_ENABLE;
|
||||
|
||||
/* Enable internal bandgap reference if selected in the configuration */
|
||||
if (module_inst->reference == DAC_REFERENCE_INT1V) {
|
||||
#if (SAMC21)
|
||||
system_voltage_reference_enable(SYSTEM_VOLTAGE_REFERENCE_OUTPUT);
|
||||
}
|
||||
|
||||
if(dac_module->CTRLA.reg & DAC_CTRLA_ENABLE) {
|
||||
while(! (dac_module->STATUS.reg & DAC_STATUS_READY)) {
|
||||
};
|
||||
}
|
||||
#else
|
||||
system_voltage_reference_enable(SYSTEM_VOLTAGE_REFERENCE_BANDGAP);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Disable the DAC module.
|
||||
*
|
||||
* Disables the DAC interface and the output buffer.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software instance struct
|
||||
*
|
||||
*/
|
||||
void dac_disable(
|
||||
struct dac_module *const module_inst)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
|
||||
Dac *const dac_module = module_inst->hw;
|
||||
|
||||
/* Wait until the synchronization is complete */
|
||||
while (dac_is_syncing(module_inst)) {
|
||||
};
|
||||
|
||||
/* Disbale interrupt */
|
||||
dac_module->INTENCLR.reg = DAC_INTENCLR_MASK;
|
||||
/* Clear interrupt flag */
|
||||
dac_module->INTFLAG.reg = DAC_INTFLAG_MASK;
|
||||
|
||||
/* Disable DAC */
|
||||
dac_module->CTRLA.reg &= ~DAC_CTRLA_ENABLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Enables a DAC event input or output.
|
||||
*
|
||||
* Enables one or more input or output events to or from the DAC module. See
|
||||
* \ref dac_events "dac_events" for a list of events this module supports.
|
||||
*
|
||||
* \note Events cannot be altered while the module is enabled.
|
||||
*
|
||||
* \param[in] module_inst Software instance for the DAC peripheral
|
||||
* \param[in] events Struct containing flags of events to enable
|
||||
*/
|
||||
void dac_enable_events(
|
||||
struct dac_module *const module_inst,
|
||||
struct dac_events *const events)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
Assert(events);
|
||||
|
||||
Dac *const dac_module = module_inst->hw;
|
||||
|
||||
uint32_t event_mask = 0;
|
||||
|
||||
#if(SAMC21)
|
||||
/* Configure Enable Inversion of input event */
|
||||
if (events->generate_event_on_chan_falling_edge) {
|
||||
event_mask |= DAC_EVCTRL_INVEI;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Configure Buffer Empty event */
|
||||
if (events->generate_event_on_buffer_empty) {
|
||||
event_mask |= DAC_EVCTRL_EMPTYEO;
|
||||
}
|
||||
|
||||
/* Configure Conversion Start event */
|
||||
if (events->on_event_start_conversion) {
|
||||
event_mask |= DAC_EVCTRL_STARTEI;
|
||||
module_inst->start_on_event = true;
|
||||
}
|
||||
|
||||
dac_module->EVCTRL.reg |= event_mask;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Disables a DAC event input or output.
|
||||
*
|
||||
* Disables one or more input or output events to or from the DAC module. See
|
||||
* \ref dac_events "dac_events" for a list of events this module supports.
|
||||
*
|
||||
* \note Events cannot be altered while the module is enabled.
|
||||
*
|
||||
* \param[in] module_inst Software instance for the DAC peripheral
|
||||
* \param[in] events Struct containing flags of events to disable
|
||||
*/
|
||||
void dac_disable_events(
|
||||
struct dac_module *const module_inst,
|
||||
struct dac_events *const events)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
Assert(events);
|
||||
|
||||
Dac *const dac_module = module_inst->hw;
|
||||
|
||||
uint32_t event_mask = 0;
|
||||
|
||||
/* Configure Buffer Empty event */
|
||||
if (events->generate_event_on_buffer_empty) {
|
||||
event_mask |= DAC_EVCTRL_EMPTYEO;
|
||||
}
|
||||
|
||||
/* Configure Conversion Start event */
|
||||
if (events->on_event_start_conversion) {
|
||||
event_mask |= DAC_EVCTRL_STARTEI;
|
||||
module_inst->start_on_event = false;
|
||||
}
|
||||
|
||||
dac_module->EVCTRL.reg &= ~event_mask;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Initializes a DAC channel configuration structure to defaults.
|
||||
*
|
||||
* Initializes a given DAC channel configuration structure to a set of
|
||||
* known default values. This function should be called on any new
|
||||
* instance of the configuration structures before being modified by the
|
||||
* user application.
|
||||
*
|
||||
* The default configuration is as follows:
|
||||
* \li Start Conversion Event Input enabled
|
||||
* \li Start Data Buffer Empty Event Output disabled
|
||||
*
|
||||
* \param[out] config Configuration structure to initialize to default values
|
||||
*/
|
||||
void dac_chan_get_config_defaults(
|
||||
struct dac_chan_config *const config)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(config);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Writes a DAC channel configuration to the hardware module.
|
||||
*
|
||||
* Writes a given channel configuration to the hardware module.
|
||||
*
|
||||
* \note The DAC device instance structure must be initialized before calling
|
||||
* this function.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software instance struct
|
||||
* \param[in] channel Channel to configure
|
||||
* \param[in] config Pointer to the configuration struct
|
||||
*
|
||||
*/
|
||||
void dac_chan_set_config(
|
||||
struct dac_module *const module_inst,
|
||||
const enum dac_channel channel,
|
||||
struct dac_chan_config *const config)
|
||||
{
|
||||
/* No channel support yet */
|
||||
UNUSED(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Enable a DAC channel.
|
||||
*
|
||||
* Enables the selected DAC channel.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software instance struct
|
||||
* \param[in] channel Channel to enable
|
||||
*
|
||||
*/
|
||||
void dac_chan_enable(
|
||||
struct dac_module *const module_inst,
|
||||
enum dac_channel channel)
|
||||
{
|
||||
/* No channel support yet */
|
||||
UNUSED(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Disable a DAC channel.
|
||||
*
|
||||
* Disables the selected DAC channel.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software instance struct
|
||||
* \param[in] channel Channel to disable
|
||||
*
|
||||
*/
|
||||
void dac_chan_disable(
|
||||
struct dac_module *const module_inst,
|
||||
enum dac_channel channel)
|
||||
{
|
||||
/* No channel support yet */
|
||||
UNUSED(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Enable the output buffer.
|
||||
*
|
||||
* Enables the output buffer and drives the DAC output to the VOUT pin.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software instance struct
|
||||
* \param[in] channel DAC channel to alter
|
||||
*/
|
||||
void dac_chan_enable_output_buffer(
|
||||
struct dac_module *const module_inst,
|
||||
enum dac_channel channel)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
|
||||
/* No channel support yet */
|
||||
UNUSED(channel);
|
||||
|
||||
Dac *const dac_module = module_inst->hw;
|
||||
|
||||
/* Enable output buffer */
|
||||
dac_module->CTRLB.reg |= DAC_OUTPUT_EXTERNAL;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Disable the output buffer.
|
||||
*
|
||||
* Disables the output buffer.
|
||||
*
|
||||
* \note The output buffer(s) should be disabled when a channel's output is not
|
||||
* currently needed, as it will draw current even if the system is in
|
||||
* sleep mode.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software instance struct
|
||||
* \param[in] channel DAC channel to alter
|
||||
*/
|
||||
void dac_chan_disable_output_buffer(
|
||||
struct dac_module *const module_inst,
|
||||
enum dac_channel channel)
|
||||
{
|
||||
/* Sanity check arguments*/
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
|
||||
/* No channel support yet */
|
||||
UNUSED(channel);
|
||||
|
||||
Dac *const dac_module = module_inst->hw;
|
||||
|
||||
/* Disable output buffer */
|
||||
dac_module->CTRLB.reg &= ~DAC_OUTPUT_EXTERNAL;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Write to the DAC.
|
||||
*
|
||||
* This function writes to the DATA or DATABUF register.
|
||||
* If the conversion is not event-triggered, the data will be written to
|
||||
* the DATA register and the conversion will start.
|
||||
* If the conversion is event-triggered, the data will be written to DATABUF
|
||||
* and transferred to the DATA register and converted when a Start Conversion
|
||||
* Event is issued.
|
||||
* Conversion data must be right or left adjusted according to configuration
|
||||
* settings.
|
||||
* \note To be event triggered, the enable_start_on_event must be
|
||||
* enabled in the configuration.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software device struct
|
||||
* \param[in] channel DAC channel to write to
|
||||
* \param[in] data Conversion data
|
||||
*
|
||||
* \return Status of the operation.
|
||||
* \retval STATUS_OK If the data was written
|
||||
*/
|
||||
enum status_code dac_chan_write(
|
||||
struct dac_module *const module_inst,
|
||||
enum dac_channel channel,
|
||||
const uint16_t data)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
|
||||
/* No channel support yet */
|
||||
UNUSED(channel);
|
||||
|
||||
Dac *const dac_module = module_inst->hw;
|
||||
|
||||
/* Wait until the synchronization is complete */
|
||||
while (dac_is_syncing(module_inst)) {
|
||||
};
|
||||
|
||||
if (module_inst->start_on_event) {
|
||||
/* Write the new value to the buffered DAC data register */
|
||||
dac_module->DATABUF.reg = data;
|
||||
} else {
|
||||
/* Write the new value to the DAC data register */
|
||||
dac_module->DATA.reg = data;
|
||||
}
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Write to the DAC.
|
||||
*
|
||||
* This function converts a specific number of digital data.
|
||||
* The conversion should be event-triggered, the data will be written to DATABUF
|
||||
* and transferred to the DATA register and converted when a Start Conversion
|
||||
* Event is issued.
|
||||
* Conversion data must be right or left adjusted according to configuration
|
||||
* settings.
|
||||
* \note To be event triggered, the enable_start_on_event must be
|
||||
* enabled in the configuration.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software device struct
|
||||
* \param[in] channel DAC channel to write to
|
||||
* \param[in] buffer Pointer to the digital data write buffer to be converted
|
||||
* \param[in] length Length of the write buffer
|
||||
*
|
||||
* \return Status of the operation.
|
||||
* \retval STATUS_OK If the data was written or no data conversion required
|
||||
* \retval STATUS_ERR_UNSUPPORTED_DEV The DAC is not configured as using event trigger
|
||||
* \retval STATUS_BUSY The DAC is busy to convert
|
||||
*/
|
||||
enum status_code dac_chan_write_buffer_wait(
|
||||
struct dac_module *const module_inst,
|
||||
enum dac_channel channel,
|
||||
uint16_t *buffer,
|
||||
uint32_t length)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
|
||||
/* No channel support yet */
|
||||
UNUSED(channel);
|
||||
|
||||
Dac *const dac_module = module_inst->hw;
|
||||
|
||||
/* Wait until the synchronization is complete */
|
||||
while (dac_is_syncing(module_inst)) {
|
||||
};
|
||||
|
||||
/* Zero length request */
|
||||
if (length == 0) {
|
||||
/* No data to be converted */
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
#if DAC_CALLBACK_MODE == true
|
||||
/* Check if busy */
|
||||
if (module_inst->job_status == STATUS_BUSY) {
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Only support event triggered conversion */
|
||||
if (module_inst->start_on_event == false) {
|
||||
return STATUS_ERR_UNSUPPORTED_DEV;
|
||||
}
|
||||
|
||||
/* Blocks while buffer is being transferred */
|
||||
while (length--) {
|
||||
/* Convert one data */
|
||||
dac_chan_write(module_inst, channel, buffer[length]);
|
||||
|
||||
/* Wait until Transmit is complete or timeout */
|
||||
for (uint32_t i = 0; i <= DAC_TIMEOUT; i++) {
|
||||
if (dac_module->INTFLAG.reg & DAC_INTFLAG_EMPTY) {
|
||||
break;
|
||||
} else if (i == DAC_TIMEOUT) {
|
||||
return STATUS_ERR_TIMEOUT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Retrieves the current module status
|
||||
*
|
||||
* Checks the status of the module and returns it as a bitmask of status
|
||||
* flags.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software device struct
|
||||
*
|
||||
* \return Bitmask of status flags.
|
||||
*
|
||||
* \retval DAC_STATUS_CHANNEL_0_EMPTY Data has been transferred from DATABUF
|
||||
* to DATA by a start conversion event
|
||||
* and DATABUF is ready for new data
|
||||
* \retval DAC_STATUS_CHANNEL_0_UNDERRUN A start conversion event has occurred
|
||||
* when DATABUF is empty
|
||||
*
|
||||
*/
|
||||
uint32_t dac_get_status(
|
||||
struct dac_module *const module_inst)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
|
||||
Dac *const dac_module = module_inst->hw;
|
||||
|
||||
uint8_t intflags = dac_module->INTFLAG.reg;
|
||||
uint32_t status_flags = 0;
|
||||
|
||||
if (intflags & DAC_INTFLAG_EMPTY) {
|
||||
status_flags |= DAC_STATUS_CHANNEL_0_EMPTY;
|
||||
}
|
||||
|
||||
if (intflags & DAC_INTFLAG_UNDERRUN) {
|
||||
status_flags |= DAC_STATUS_CHANNEL_0_UNDERRUN;
|
||||
}
|
||||
|
||||
return status_flags;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Clears a module status flag
|
||||
*
|
||||
* Clears the given status flag of the module.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software device struct
|
||||
* \param[in] status_flags Bit mask of status flags to clear
|
||||
*
|
||||
*/
|
||||
void dac_clear_status(
|
||||
struct dac_module *const module_inst,
|
||||
uint32_t status_flags)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
|
||||
Dac *const dac_module = module_inst->hw;
|
||||
|
||||
uint32_t intflags = 0;
|
||||
|
||||
if (status_flags & DAC_STATUS_CHANNEL_0_EMPTY) {
|
||||
intflags |= DAC_INTFLAG_EMPTY;
|
||||
}
|
||||
|
||||
if (status_flags & DAC_STATUS_CHANNEL_0_UNDERRUN) {
|
||||
intflags |= DAC_INTFLAG_UNDERRUN;
|
||||
}
|
||||
|
||||
dac_module->INTFLAG.reg = intflags;
|
||||
}
|
||||
|
|
@ -0,0 +1,425 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM Digital-to-Analog Interrupt Driver
|
||||
*
|
||||
* Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip
|
||||
* software and any derivatives exclusively with Microchip products.
|
||||
* It is your responsibility to comply with third party license terms applicable
|
||||
* to your use of third party software (including open source software) that
|
||||
* may accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
|
||||
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
|
||||
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
|
||||
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
|
||||
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
|
||||
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
|
||||
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
|
||||
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
|
||||
*/
|
||||
#include "dac.h"
|
||||
#include "dac_callback.h"
|
||||
|
||||
struct dac_module *_dac_instances[DAC_INST_NUM];
|
||||
|
||||
/**
|
||||
* \brief Convert a specific number digital data to analog through DAC.
|
||||
*
|
||||
* This function will perform a conversion of specific number of digital data.
|
||||
* The conversion should be event-triggered, the data will be written to DATABUF
|
||||
* and transferred to the DATA register and converted when a Start Conversion
|
||||
* Event is issued.
|
||||
* Conversion data must be right or left adjusted according to configuration
|
||||
* settings.
|
||||
* \note To be event triggered, the enable_start_on_event must be
|
||||
* enabled in the configuration.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software device struct
|
||||
* \param[in] channel DAC channel to write to
|
||||
* \param[in] buffer Pointer to the digital data write buffer to be converted
|
||||
* \param[in] length Size of the write buffer
|
||||
*
|
||||
* \return Status of the operation.
|
||||
* \retval STATUS_OK If the data was written
|
||||
* \retval STATUS_ERR_UNSUPPORTED_DEV If a callback that requires event driven
|
||||
* mode was specified with a DAC instance
|
||||
* configured in non-event mode
|
||||
* \retval STATUS_BUSY The DAC is busy to accept new job
|
||||
*/
|
||||
enum status_code dac_chan_write_buffer_job(
|
||||
struct dac_module *const module_inst,
|
||||
const enum dac_channel channel,
|
||||
uint16_t *buffer,
|
||||
uint32_t length)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
Assert(buffer);
|
||||
|
||||
UNUSED(channel);
|
||||
|
||||
Dac *const dac_module = module_inst->hw;
|
||||
|
||||
/* DAC interrupts require it to be driven by events to work, fail if in
|
||||
* unbuffered (polled) mode */
|
||||
if (module_inst->start_on_event == false) {
|
||||
return STATUS_ERR_UNSUPPORTED_DEV;
|
||||
}
|
||||
|
||||
if(module_inst->remaining_conversions != 0 ||
|
||||
module_inst->job_status == STATUS_BUSY){
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
|
||||
/* Wait until the synchronization is complete */
|
||||
while (dac_is_syncing(module_inst)) {
|
||||
};
|
||||
|
||||
module_inst->job_status = STATUS_BUSY;
|
||||
|
||||
module_inst->remaining_conversions = length;
|
||||
module_inst->job_buffer = buffer;
|
||||
module_inst->transferred_conversions = 0;
|
||||
|
||||
/* Enable interrupt */
|
||||
system_interrupt_enable(SYSTEM_INTERRUPT_MODULE_DAC);
|
||||
dac_module->INTFLAG.reg = DAC_INTFLAG_UNDERRUN | DAC_INTFLAG_EMPTY;
|
||||
dac_module->INTENSET.reg = DAC_INTENSET_UNDERRUN | DAC_INTENSET_EMPTY;
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Convert one digital data job.
|
||||
*
|
||||
* This function will perform a conversion of specfic number of digital data.
|
||||
* The conversion is event-triggered, the data will be written to DATABUF
|
||||
* and transferred to the DATA register and converted when a Start Conversion
|
||||
* Event is issued.
|
||||
* Conversion data must be right or left adjusted according to configuration
|
||||
* settings.
|
||||
* \note To be event triggered, the enable_start_on_event must be
|
||||
* enabled in the configuration.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software device struct
|
||||
* \param[in] channel DAC channel to write to
|
||||
* \param[in] data Digital data to be converted
|
||||
*
|
||||
* \return Status of the operation.
|
||||
* \retval STATUS_OK If the data was written
|
||||
* \retval STATUS_ERR_UNSUPPORTED_DEV If a callback that requires event driven
|
||||
* mode was specified with a DAC instance
|
||||
* configured in non-event mode
|
||||
* \retval STATUS_BUSY The DAC is busy to accept new job
|
||||
*/
|
||||
enum status_code dac_chan_write_job(
|
||||
struct dac_module *const module_inst,
|
||||
const enum dac_channel channel,
|
||||
uint16_t data)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(module_inst->hw);
|
||||
|
||||
UNUSED(channel);
|
||||
|
||||
/* DAC interrupts require it to be driven by events to work, fail if in
|
||||
* unbuffered (polled) mode */
|
||||
if (module_inst->start_on_event == false) {
|
||||
return STATUS_ERR_UNSUPPORTED_DEV;
|
||||
}
|
||||
|
||||
if(module_inst->remaining_conversions != 0 ||
|
||||
module_inst->job_status == STATUS_BUSY){
|
||||
return STATUS_BUSY;
|
||||
}
|
||||
|
||||
dac_chan_write_buffer_job(module_inst, channel, &data, 1);
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Registers an asynchronous callback function with the driver.
|
||||
*
|
||||
* Registers an asynchronous callback with the DAC driver, fired when a callback
|
||||
* condition occurs.
|
||||
*
|
||||
* \param[in,out] module_inst Pointer to the DAC software instance struct
|
||||
* \param[in] callback Pointer to the callback function to register
|
||||
* \param[in] channel Logical channel to register callback function
|
||||
* \param[in] type Type of callback function to register
|
||||
*
|
||||
* \return Status of the registration operation.
|
||||
* \retval STATUS_OK The callback was registered successfully
|
||||
* \retval STATUS_ERR_INVALID_ARG If an invalid callback type was supplied
|
||||
* \retval STATUS_ERR_UNSUPPORTED_DEV If a callback that requires event driven
|
||||
* mode was specified with a DAC instance
|
||||
* configured in non-event mode
|
||||
*/
|
||||
enum status_code dac_register_callback(
|
||||
struct dac_module *const module_inst,
|
||||
const enum dac_channel channel,
|
||||
const dac_callback_t callback,
|
||||
const enum dac_callback type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
Assert(callback);
|
||||
|
||||
UNUSED(channel);
|
||||
|
||||
/* DAC interrupts require it to be driven by events to work, fail if in
|
||||
* unbuffered (polled) mode */
|
||||
if (module_inst->start_on_event == false) {
|
||||
return STATUS_ERR_UNSUPPORTED_DEV;
|
||||
}
|
||||
|
||||
if ((uint8_t)type < DAC_CALLBACK_N) {
|
||||
module_inst->callback[(uint8_t)type] = callback;
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Unregisters an asynchronous callback function with the driver.
|
||||
*
|
||||
* Unregisters an asynchronous callback with the DAC driver, removing it
|
||||
* from the internal callback registration table.
|
||||
*
|
||||
* \param[in,out] module_inst Pointer to the DAC software instance struct
|
||||
* \param[in] channel Logical channel to unregister callback function
|
||||
* \param[in] type Type of callback function to unregister
|
||||
*
|
||||
* \return Status of the de-registration operation.
|
||||
* \retval STATUS_OK The callback was unregistered successfully
|
||||
* \retval STATUS_ERR_INVALID_ARG If an invalid callback type was supplied
|
||||
* \retval STATUS_ERR_UNSUPPORTED_DEV If a callback that requires event driven
|
||||
* mode was specified with a DAC instance
|
||||
* configured in non-event mode
|
||||
*/
|
||||
enum status_code dac_unregister_callback(
|
||||
struct dac_module *const module_inst,
|
||||
const enum dac_channel channel,
|
||||
const enum dac_callback type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
|
||||
UNUSED(channel);
|
||||
|
||||
/* DAC interrupts require it to be driven by events to work, fail if in
|
||||
* unbuffered (polled) mode */
|
||||
if (module_inst->start_on_event == false) {
|
||||
return STATUS_ERR_UNSUPPORTED_DEV;
|
||||
}
|
||||
|
||||
if ((uint8_t)type < DAC_CALLBACK_N) {
|
||||
module_inst->callback[(uint8_t)type] = NULL;
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Enables asynchronous callback generation for a given channel and type.
|
||||
*
|
||||
* Enables asynchronous callbacks for a given logical DAC channel and type. This
|
||||
* must be called before a DAC channel will generate callback events.
|
||||
*
|
||||
* \param[in,out] dac_module Pointer to the DAC software instance struct
|
||||
* \param[in] channel Logical channel to enable callback function
|
||||
* \param[in] type Type of callback function callbacks to enable
|
||||
*
|
||||
* \return Status of the callback enable operation.
|
||||
* \retval STATUS_OK The callback was enabled successfully
|
||||
* \retval STATUS_ERR_UNSUPPORTED_DEV If a callback that requires event driven
|
||||
* mode was specified with a DAC instance
|
||||
* configured in non-event mode
|
||||
*/
|
||||
enum status_code dac_chan_enable_callback(
|
||||
struct dac_module *const module_inst,
|
||||
const enum dac_channel channel,
|
||||
const enum dac_callback type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
|
||||
UNUSED(channel);
|
||||
|
||||
/* DAC interrupts require it to be driven by events to work, fail if in
|
||||
* unbuffered (polled) mode */
|
||||
if (module_inst->start_on_event == false) {
|
||||
return STATUS_ERR_UNSUPPORTED_DEV;
|
||||
}
|
||||
|
||||
module_inst->callback_enable[type] = true;
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Disables asynchronous callback generation for a given channel and type.
|
||||
*
|
||||
* Disables asynchronous callbacks for a given logical DAC channel and type.
|
||||
*
|
||||
* \param[in,out] dac_module Pointer to the DAC software instance struct
|
||||
* \param[in] channel Logical channel to disable callback function
|
||||
* \param[in] type Type of callback function callbacks to disable
|
||||
*
|
||||
* \return Status of the callback disable operation.
|
||||
* \retval STATUS_OK The callback was disabled successfully
|
||||
* \retval STATUS_ERR_UNSUPPORTED_DEV If a callback that requires event driven
|
||||
* mode was specified with a DAC instance
|
||||
* configured in non-event mode
|
||||
*/
|
||||
enum status_code dac_chan_disable_callback(
|
||||
struct dac_module *const module_inst,
|
||||
const enum dac_channel channel,
|
||||
const enum dac_callback type)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
|
||||
UNUSED(channel);
|
||||
|
||||
/* DAC interrupts require it to be driven by events to work, fail if in
|
||||
* unbuffered (polled) mode */
|
||||
if (module_inst->start_on_event == false) {
|
||||
return STATUS_ERR_UNSUPPORTED_DEV;
|
||||
}
|
||||
|
||||
module_inst->callback_enable[type] = false;
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
/** \internal
|
||||
* Internal handler for DAC module interrupts.
|
||||
*
|
||||
* \param[in] instance DAC instance number
|
||||
*/
|
||||
static void _dac_interrupt_handler(const uint8_t instance)
|
||||
{
|
||||
struct dac_module *module = _dac_instances[instance];
|
||||
Dac *const dac_hw = module->hw;
|
||||
|
||||
if (dac_hw->INTFLAG.reg & DAC_INTFLAG_UNDERRUN) {
|
||||
dac_hw->INTFLAG.reg = DAC_INTFLAG_UNDERRUN;
|
||||
|
||||
if ((module->callback) &&
|
||||
(module->callback_enable[DAC_CALLBACK_DATA_UNDERRUN])){
|
||||
module->callback[DAC_CALLBACK_DATA_UNDERRUN](0);
|
||||
}
|
||||
}
|
||||
|
||||
if (dac_hw->INTFLAG.reg & DAC_INTFLAG_EMPTY) {
|
||||
dac_hw->INTFLAG.reg = DAC_INTFLAG_EMPTY;
|
||||
|
||||
/* If in a write buffer job */
|
||||
if (module->remaining_conversions) {
|
||||
|
||||
/* Fill the data buffer with next data in write buffer */
|
||||
dac_hw->DATABUF.reg =
|
||||
module->job_buffer[module->transferred_conversions++];
|
||||
|
||||
/* Write buffer size decrement */
|
||||
module->remaining_conversions --;
|
||||
|
||||
/* If in a write buffer job and all the data are converted */
|
||||
if (module->remaining_conversions == 0) {
|
||||
module->job_status = STATUS_OK;
|
||||
|
||||
/* Disable interrupt */
|
||||
dac_hw->INTENCLR.reg = DAC_INTENCLR_EMPTY;
|
||||
dac_hw->INTFLAG.reg = DAC_INTFLAG_EMPTY;
|
||||
system_interrupt_disable(SYSTEM_INTERRUPT_MODULE_DAC);
|
||||
|
||||
if ((module->callback) &&
|
||||
(module->callback_enable[DAC_CALLBACK_TRANSFER_COMPLETE])) {
|
||||
module->callback[DAC_CALLBACK_TRANSFER_COMPLETE](0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((module->callback) &&
|
||||
(module->callback_enable[DAC_CALLBACK_DATA_EMPTY])) {
|
||||
module->callback[DAC_CALLBACK_DATA_EMPTY](0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Handler for the DAC hardware module interrupt. */
|
||||
void DAC_Handler(void)
|
||||
{
|
||||
_dac_interrupt_handler(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Gets the status of a job
|
||||
*
|
||||
* Gets the status of an ongoing or the last job.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software instance struct
|
||||
* \param[in] channel Logical channel to enable callback function
|
||||
*
|
||||
* \return Status of the job.
|
||||
*/
|
||||
enum status_code dac_chan_get_job_status(
|
||||
struct dac_module *module_inst,
|
||||
const enum dac_channel channel)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
|
||||
UNUSED(channel);
|
||||
|
||||
return module_inst->job_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Aborts an ongoing job
|
||||
*
|
||||
* Aborts an ongoing job.
|
||||
*
|
||||
* \param[in] module_inst Pointer to the DAC software instance struct
|
||||
* \param[in] channel Logical channel to enable callback function
|
||||
*/
|
||||
void dac_chan_abort_job(
|
||||
struct dac_module *module_inst,
|
||||
const enum dac_channel channel)
|
||||
{
|
||||
/* Sanity check arguments */
|
||||
Assert(module_inst);
|
||||
|
||||
UNUSED(channel);
|
||||
|
||||
/* Disable interrupt */
|
||||
module_inst->hw->INTFLAG.reg = DAC_INTFLAG_UNDERRUN | DAC_INTFLAG_EMPTY;
|
||||
module_inst->hw->INTENCLR.reg = DAC_INTENCLR_UNDERRUN | DAC_INTENCLR_EMPTY;
|
||||
|
||||
/* Mark job as aborted */
|
||||
module_inst->job_status = STATUS_ABORTED;
|
||||
module_inst->remaining_conversions = 0;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,625 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM Peripheral Digital-to-Analog Converter Driver
|
||||
*
|
||||
* Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Subject to your compliance with these terms, you may use Microchip
|
||||
* software and any derivatives exclusively with Microchip products.
|
||||
* It is your responsibility to comply with third party license terms applicable
|
||||
* to your use of third party software (including open source software) that
|
||||
* may accompany Microchip software.
|
||||
*
|
||||
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
|
||||
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
|
||||
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
|
||||
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
|
||||
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
|
||||
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
|
||||
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
|
||||
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
|
||||
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
|
||||
*/
|
||||
#ifndef DAC_FEATURE_H_INCLUDED
|
||||
#define DAC_FEATURE_H_INCLUDED
|
||||
|
||||
/**
|
||||
* \defgroup asfdoc_sam0_dac_group SAM Digital-to-Analog (DAC) Driver
|
||||
*
|
||||
* This driver for Atmel® | SMART ARM®-based microcontrollers provides an interface for the conversion of
|
||||
* digital values to analog voltage. The following driver API modes are covered
|
||||
* by this manual:
|
||||
*
|
||||
* - Polled APIs
|
||||
* \if DAC_CALLBACK_MODE
|
||||
* - Callback APIs
|
||||
* \endif
|
||||
*
|
||||
* The following peripheral is used by this module:
|
||||
* - DAC (Digital-to-Analog Converter)
|
||||
*
|
||||
* The following devices can use this module:
|
||||
* - Atmel | SMART SAM D20/D21
|
||||
* - Atmel | SMART SAM D10/D11
|
||||
* - Atmel | SMART SAM DA1
|
||||
* - Atmel | SMART SAM HA1
|
||||
* - Atmel | SMART SAM C21
|
||||
*
|
||||
* The outline of this documentation is as follows:
|
||||
* - \ref asfdoc_sam0_dac_prerequisites
|
||||
* - \ref asfdoc_sam0_dac_module_overview
|
||||
* - \ref asfdoc_sam0_dac_special_considerations
|
||||
* - \ref asfdoc_sam0_dac_extra_info
|
||||
* - \ref asfdoc_sam0_dac_examples
|
||||
* - \ref asfdoc_sam0_dac_api_overview
|
||||
*
|
||||
*
|
||||
* \section asfdoc_sam0_dac_prerequisites Prerequisites
|
||||
*
|
||||
* There are no prerequisites for this module.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_sam0_dac_module_overview Module Overview
|
||||
*
|
||||
* The Digital-to-Analog converter converts a digital value to analog voltage.
|
||||
* The SAM DAC module has one channel with 10-bit resolution,
|
||||
* and is capable of converting up to 350k samples per second (ksps).
|
||||
*
|
||||
* A common use of DAC is to generate audio signals by connecting the DAC
|
||||
* output to a speaker, or to generate a reference voltage; either for an
|
||||
* external circuit or an internal peripheral such as the Analog Comparator.
|
||||
*
|
||||
* After being set up, the DAC will convert new digital values written to the
|
||||
* conversion data register (DATA) to an analog value either on the VOUT pin of
|
||||
* the device, or internally for use as an input to the AC, ADC, and other analog
|
||||
* modules.
|
||||
*
|
||||
* Writing the DATA register will start a new conversion. It is also possible
|
||||
* to trigger the conversion from the event system.
|
||||
*
|
||||
* A simplified block diagram of the DAC can be seen in
|
||||
* \ref asfdoc_sam0_dac_module_block_diagram "the figure below".
|
||||
*
|
||||
* \anchor asfdoc_sam0_dac_module_block_diagram
|
||||
* \image html dac_block_diagram.svg "DAC Block Diagram"
|
||||
*
|
||||
* \subsection asfdoc_sam0_dac_conversion_range Conversion Range
|
||||
* The conversion range is between GND and the selected voltage reference.
|
||||
* Available voltage references are:
|
||||
* \li AVCC voltage reference
|
||||
* \li Internal 1V reference (INT1V)
|
||||
* \li External voltage reference (AREF)
|
||||
*
|
||||
* \note Internal references will be enabled by the driver, but not disabled.
|
||||
* Any reference not used by the application should be disabled by the application.
|
||||
*
|
||||
* The output voltage from a DAC channel is given as:
|
||||
* \f[
|
||||
* V_{OUT} = \frac{DATA}{0x3FF} \times VREF
|
||||
* \f]
|
||||
*
|
||||
* \subsection asfdoc_sam0_dac_conversion Conversion
|
||||
* The digital value written to the conversion data register (DATA) will be
|
||||
* converted to an analog value.
|
||||
* Writing the DATA register will start a new conversion.
|
||||
* It is also possible to write the conversion data to the DATABUF register,
|
||||
* the writing of the DATA register can then be triggered from the event
|
||||
* system, which will load the value from DATABUF to DATA.
|
||||
*
|
||||
* \subsection asfdoc_sam0_dac_analog_output Analog Output
|
||||
* The analog output value can be output to either the VOUT pin or internally,
|
||||
* but not both at the same time.
|
||||
*
|
||||
* \subsubsection asfdoc_sam0_dac_analog_output_external External Output
|
||||
* The output buffer must be enabled in order to drive the DAC output to the
|
||||
* VOUT pin. Due to the output buffer, the DAC has high drive strength, and is
|
||||
* capable of driving both resistive and capacitive loads, as well as loads
|
||||
* which combine both.
|
||||
*
|
||||
* \subsubsection asfdoc_sam0_dac_analog_output_internal Internal Output
|
||||
* The analog value can be internally available for use as input to the
|
||||
* AC or ADC modules.
|
||||
*
|
||||
* \subsection asfdoc_sam0_dac_events Events
|
||||
* Events generation and event actions are configurable in the DAC.
|
||||
* The DAC has one event line input and one event output: <i>Start Conversion</i>
|
||||
* and <i>Data Buffer Empty</i>.
|
||||
*
|
||||
* If the Start Conversion input event is enabled in the module configuration,
|
||||
* an incoming event will load data from the data buffer to the data register
|
||||
* and start a new conversion. This method synchronizes conversions with
|
||||
* external events (such as those from a timer module) and ensures regular and
|
||||
* fixed conversion intervals.
|
||||
*
|
||||
* If the Data Buffer Empty output event is enabled in the module configuration,
|
||||
* events will be generated when the DAC data buffer register becomes empty and
|
||||
* new data can be loaded to the buffer.
|
||||
*
|
||||
* \note The connection of events between modules requires the use of the event
|
||||
* driver to route output event of one module to the input event of another.
|
||||
* For more information on event routing, refer to the documentation
|
||||
* \ref asfdoc_sam0_events_group "SAM Event System (EVENTS) Driver".
|
||||
*
|
||||
* \subsection asfdoc_sam0_dac_data_adjust Left and Right Adjusted Values
|
||||
* The 10-bit input value to the DAC is contained in a 16-bit register. This
|
||||
* can be configured to be either left or right adjusted. In
|
||||
* \ref asfdoc_sam0_dac_module_adj_modes "the figure below" both options are
|
||||
* shown, and the position of the most (MSB) and the least (LSB) significant bits
|
||||
* are indicated. The unused bits should always be written to zero.
|
||||
*
|
||||
* \anchor asfdoc_sam0_dac_module_adj_modes
|
||||
* \dot
|
||||
* digraph {
|
||||
* subgraph cluster_right {
|
||||
* msbl [label="MSB", shape=none, group="msbl"];
|
||||
* lsbl [label="LSB", shape=none];
|
||||
* node [shape=none];
|
||||
* color="white";
|
||||
* reg_left [label=<
|
||||
* <table cellspacing="0" cellpadding="2" width="100%">
|
||||
* <tr>
|
||||
* <td port="msb">15</td>
|
||||
* <td>14</td>
|
||||
* <td>13</td>
|
||||
* <td>12</td>
|
||||
* <td>11</td>
|
||||
* <td>10</td>
|
||||
* <td>9</td>
|
||||
* <td>8</td>
|
||||
* <td>7</td>
|
||||
* <td port="lsb">6</td>
|
||||
* <td>5</td>
|
||||
* <td>4</td>
|
||||
* <td>3</td>
|
||||
* <td>2</td>
|
||||
* <td>1</td>
|
||||
* <td>0</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td COLSPAN="10"> DATA[9:0] </td>
|
||||
* <td BGCOLOR="lightgray"> </td>
|
||||
* <td BGCOLOR="lightgray"> </td>
|
||||
* <td BGCOLOR="lightgray"> </td>
|
||||
* <td BGCOLOR="lightgray"> </td>
|
||||
* <td BGCOLOR="lightgray"> </td>
|
||||
* <td BGCOLOR="lightgray"> </td>
|
||||
* </tr>
|
||||
* </table>
|
||||
* >];
|
||||
* msbl -> reg_left:msb:n;
|
||||
* lsbl -> reg_left:lsb;
|
||||
* label ="Left adjusted.\n";
|
||||
* }
|
||||
* subgraph cluster_left {
|
||||
* rankdir=TB;
|
||||
* msb [label="MSB", shape=none];
|
||||
* lsb [label="LSB", shape=none];
|
||||
* color="white";
|
||||
* node [shape=none];
|
||||
* reg_right [label=<
|
||||
* <table cellspacing="0" cellpadding="2">
|
||||
* <tr>
|
||||
* <td>15</td>
|
||||
* <td>14</td>
|
||||
* <td>13</td>
|
||||
* <td>12</td>
|
||||
* <td>11</td>
|
||||
* <td>10</td>
|
||||
* <td port="msb">9</td>
|
||||
* <td>8</td>
|
||||
* <td>7</td>
|
||||
* <td>6</td>
|
||||
* <td>5</td>
|
||||
* <td>4</td>
|
||||
* <td>3</td>
|
||||
* <td>2</td>
|
||||
* <td>1</td>
|
||||
* <td port="lsb">0</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td BGCOLOR="lightgray"></td>
|
||||
* <td BGCOLOR="lightgray"></td>
|
||||
* <td BGCOLOR="lightgray"></td>
|
||||
* <td BGCOLOR="lightgray"></td>
|
||||
* <td BGCOLOR="lightgray"></td>
|
||||
* <td BGCOLOR="lightgray"></td>
|
||||
* <td COLSPAN="10"> DATA[9:0] </td>
|
||||
* </tr>
|
||||
* </table>
|
||||
* >];
|
||||
* msb -> reg_right:msb;
|
||||
* lsb -> reg_right:lsb:n;
|
||||
* label = "Right adjusted.\n";
|
||||
* graph [shape=none];
|
||||
* }
|
||||
* }
|
||||
* \enddot
|
||||
*
|
||||
* \subsection asfdoc_sam0_dac_clk_sources Clock Sources
|
||||
* The clock for the DAC interface (CLK_DAC) is generated by the Power Manager.
|
||||
* This clock is turned on by default, and can be enabled and disabled in the
|
||||
* Power Manager.
|
||||
*
|
||||
* Additionally, an asynchronous clock source (GCLK_DAC) is required.
|
||||
* These clocks are normally disabled by default. The selected clock source
|
||||
* must be enabled in the Power Manager before it can be used by the DAC.
|
||||
* The DAC core operates asynchronously from the user interface and
|
||||
* peripheral bus. As a consequence, the DAC needs two clock cycles of both
|
||||
* CLK_DAC and GCLK_DAC to synchronize the values written to some of the
|
||||
* control and data registers.
|
||||
* The oscillator source for the GCLK_DAC clock is selected in the System
|
||||
* Control Interface (SCIF).
|
||||
*
|
||||
* \section asfdoc_sam0_dac_special_considerations Special Considerations
|
||||
*
|
||||
* \subsection asfdoc_sam0_dac_special_considerations_output_buffer Output Driver
|
||||
* The DAC can only do conversions in Active or Idle modes. However, if the
|
||||
* output buffer is enabled it will draw current even if the system is in
|
||||
* sleep mode. Therefore, always make sure that the output buffer is not
|
||||
* enabled when it is not needed, to ensure minimum power consumption.
|
||||
*
|
||||
* \subsection asfdoc_sam0_dac_special_considerations_conversion_time Conversion Time
|
||||
* DAC conversion time is approximately 2.85μs. The user must ensure that new
|
||||
* data is not written to the DAC before the last conversion is complete.
|
||||
* Conversions should be triggered by a periodic event from a Timer/Counter or
|
||||
* another peripheral.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_sam0_dac_extra_info Extra Information
|
||||
*
|
||||
* For extra information, see \ref asfdoc_sam0_dac_extra. This includes:
|
||||
* - \ref asfdoc_sam0_dac_extra_acronyms
|
||||
* - \ref asfdoc_sam0_dac_extra_dependencies
|
||||
* - \ref asfdoc_sam0_dac_extra_errata
|
||||
* - \ref asfdoc_sam0_dac_extra_history
|
||||
*
|
||||
*
|
||||
* \section asfdoc_sam0_dac_examples Examples
|
||||
*
|
||||
* For a list of examples related to this driver, see
|
||||
* \ref asfdoc_sam0_dac_exqsg.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_sam0_dac_api_overview API Overview
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <compiler.h>
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
|
||||
/**
|
||||
* \name DAC Status Flags
|
||||
*
|
||||
* DAC status flags, returned by \ref dac_get_status() and cleared by
|
||||
* \ref dac_clear_status().
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** Data Buffer Empty Channel 0 - Set when data is transferred from DATABUF
|
||||
* to DATA by a start conversion event and DATABUF is ready for new data.
|
||||
*/
|
||||
#define DAC_STATUS_CHANNEL_0_EMPTY (1UL << 0)
|
||||
|
||||
/** Under-run Channel 0 - Set when a start conversion event occurs when
|
||||
* DATABUF is empty.
|
||||
*/
|
||||
#define DAC_STATUS_CHANNEL_0_UNDERRUN (1UL << 1)
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \brief DAC reference voltage enum.
|
||||
*
|
||||
* Enum for the possible reference voltages for the DAC.
|
||||
*/
|
||||
enum dac_reference {
|
||||
/** 1V from the internal band-gap reference*/
|
||||
DAC_REFERENCE_INT1V = DAC_CTRLB_REFSEL(0),
|
||||
/** Analog V<SUB>CC</SUB> as reference */
|
||||
DAC_REFERENCE_AVCC = DAC_CTRLB_REFSEL(1),
|
||||
/** External reference on AREF */
|
||||
DAC_REFERENCE_AREF = DAC_CTRLB_REFSEL(2),
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief DAC output selection enum.
|
||||
*
|
||||
* Enum for the DAC output selection.
|
||||
*/
|
||||
enum dac_output {
|
||||
/** DAC output to VOUT pin */
|
||||
DAC_OUTPUT_EXTERNAL = DAC_CTRLB_EOEN,
|
||||
/** DAC output as internal reference */
|
||||
DAC_OUTPUT_INTERNAL = DAC_CTRLB_IOEN,
|
||||
/** No output */
|
||||
DAC_OUTPUT_NONE = 0,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief DAC channel selection enum.
|
||||
*
|
||||
* Enum for the DAC channel selection.
|
||||
*/
|
||||
enum dac_channel {
|
||||
/** DAC output channel 0 */
|
||||
DAC_CHANNEL_0,
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief DAC software device instance structure.
|
||||
*
|
||||
* DAC software instance structure, used to retain software state information
|
||||
* of an associated hardware module instance.
|
||||
*
|
||||
* \note The fields of this structure should not be altered by the user
|
||||
* application; they are reserved for module-internal use only.
|
||||
*/
|
||||
struct dac_module {
|
||||
#if !defined(__DOXYGEN__)
|
||||
/** DAC hardware module */
|
||||
Dac *hw;
|
||||
/** DAC output selection */
|
||||
enum dac_output output;
|
||||
/** Reference selection */
|
||||
enum dac_reference reference;
|
||||
/** DAC event selection */
|
||||
bool start_on_event;
|
||||
# if DAC_CALLBACK_MODE == true
|
||||
/** Pointer to buffer used for ADC results */
|
||||
volatile uint16_t *job_buffer;
|
||||
/** Remaining number of conversions in current job */
|
||||
volatile uint16_t remaining_conversions;
|
||||
/** Transferred number of conversions in current job */
|
||||
volatile uint16_t transferred_conversions;
|
||||
/** DAC callback enable */
|
||||
bool callback_enable[DAC_CALLBACK_N];
|
||||
/** DAC registered callback functions */
|
||||
dac_callback_t callback[DAC_CALLBACK_N];
|
||||
/** Holds the status of the ongoing or last conversion job */
|
||||
volatile enum status_code job_status;
|
||||
# endif
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief DAC configuration structure.
|
||||
*
|
||||
* Configuration structure for a DAC instance. This structure should be
|
||||
* initialized by the \ref dac_get_config_defaults()
|
||||
* function before being modified by the user application.
|
||||
*/
|
||||
struct dac_config {
|
||||
/** Reference voltage */
|
||||
enum dac_reference reference;
|
||||
/** Select DAC output */
|
||||
enum dac_output output;
|
||||
/** Left adjusted data */
|
||||
bool left_adjust;
|
||||
/** GCLK generator used to clock the peripheral */
|
||||
enum gclk_generator clock_source;
|
||||
#ifdef FEATURE_DAC_DATABUF_WRITE_PROTECTION
|
||||
/** Bypass DATABUF write protection */
|
||||
bool databuf_protection_bypass;
|
||||
#endif
|
||||
/** Voltage pump disable */
|
||||
bool voltage_pump_disable;
|
||||
/**
|
||||
* The DAC behaves as in normal mode when the chip enters STANDBY sleep
|
||||
* mode
|
||||
*/
|
||||
bool run_in_standby;
|
||||
#if (SAMC21)
|
||||
/** Dither mode enable data */
|
||||
bool dither_mode;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief DAC event enable/disable structure.
|
||||
*
|
||||
* Event flags for the DAC module. This is used to enable and
|
||||
* disable events via \ref dac_enable_events() and \ref dac_disable_events().
|
||||
*/
|
||||
struct dac_events {
|
||||
/** Start a new DAC conversion */
|
||||
bool on_event_start_conversion;
|
||||
/** Enable event generation on data buffer empty */
|
||||
bool generate_event_on_buffer_empty;
|
||||
#if (SAMC21)
|
||||
/** Enable the falling edge of the input event for DAC1 */
|
||||
bool generate_event_on_chan_falling_edge;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief DAC channel configuration structure
|
||||
*
|
||||
* Configuration for a DAC channel. This structure should be initialized by the
|
||||
* \ref dac_chan_get_config_defaults() function before being modified by the
|
||||
* user application.
|
||||
*/
|
||||
struct dac_chan_config {
|
||||
#if !defined(__DOXYGEN__)
|
||||
/** Dummy value to ensure the struct has at least one member */
|
||||
uint8_t _dummy;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* \name Configuration and Initialization (Channel)
|
||||
* @{
|
||||
*/
|
||||
|
||||
void dac_chan_enable_output_buffer(
|
||||
struct dac_module *const dev_inst,
|
||||
const enum dac_channel channel);
|
||||
|
||||
void dac_chan_disable_output_buffer(
|
||||
struct dac_module *const dev_inst,
|
||||
const enum dac_channel channel);
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \page asfdoc_sam0_dac_extra Extra Information for DAC Driver
|
||||
*
|
||||
* \section asfdoc_sam0_dac_extra_acronyms Acronyms
|
||||
* The table below presents the acronyms used in this module:
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Acronym</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>ADC</td>
|
||||
* <td>Analog-to-Digital Converter</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>AC</td>
|
||||
* <td>Analog Comparator</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>DAC</td>
|
||||
* <td>Digital-to-Analog Converter</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>LSB</td>
|
||||
* <td>Least Significant Bit</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>MSB</td>
|
||||
* <td>Most Significant Bit</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>DMA</td>
|
||||
* <td>Direct Memory Access</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*
|
||||
*
|
||||
* \section asfdoc_sam0_dac_extra_dependencies Dependencies
|
||||
* This driver has the following dependencies:
|
||||
*
|
||||
* - \ref asfdoc_sam0_system_pinmux_group "System Pin Multiplexer Driver"
|
||||
*
|
||||
*
|
||||
* \section asfdoc_sam0_dac_extra_errata Errata
|
||||
* There are no errata related to this driver.
|
||||
*
|
||||
*
|
||||
* \section asfdoc_sam0_dac_extra_history Module History
|
||||
* An overview of the module history is presented in the table below, with
|
||||
* details on the enhancements and fixes made to the module since its first
|
||||
* release. The current version of this corresponds to the newest version in
|
||||
* the table.
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Changelog</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Add configuration for using 14-bit hardware dithering (SAMC21 support)</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Added new configuration parameters \c databuf_protection_bypass,
|
||||
* \c voltage_pump_disable. Added new callback functions
|
||||
* \c dac_chan_write_buffer_wait,
|
||||
* \c dac_chan_write_buffer_job, \c dac_chan_write_job,
|
||||
* \c dac_get_job_status, \c dac_abort_job and new callback type
|
||||
* \c DAC_CALLBACK_TRANSFER_COMPLETE for DAC conversion job</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Initial Release</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
|
||||
/**
|
||||
* \page asfdoc_sam0_dac_exqsg Examples for DAC Driver
|
||||
*
|
||||
* This is a list of the available Quick Start guides (QSGs) and example
|
||||
* applications for \ref asfdoc_sam0_dac_group. QSGs are simple examples with
|
||||
* step-by-step instructions to configure and use this driver in a selection of
|
||||
* use cases. Note that a QSG can be compiled as a standalone application or be
|
||||
* added to the user application.
|
||||
*
|
||||
* - \subpage asfdoc_sam0_dac_basic_use_case
|
||||
* \if DAC_CALLBACK_MODE
|
||||
* - \subpage asfdoc_sam0_dac_basic_use_case_callback
|
||||
* \endif
|
||||
* \if DAC_DMA_USE_MODE_SELECTION
|
||||
* - \subpage asfdoc_sam0_adc_dma_use_case_dac_in_dma
|
||||
* \endif
|
||||
*
|
||||
* \if DAC_DMA_USE_MODE_SELECTION
|
||||
* \page asfdoc_sam0_adc_dma_use_case_dac_in_dma Quick Start Guide for Using DMA with ADC/DAC
|
||||
* For this examples, see
|
||||
* \ref asfdoc_sam0_adc_dma_use_case
|
||||
* \endif
|
||||
*
|
||||
* \page asfdoc_sam0_dac_document_revision_history Document Revision History
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <th>Doc. Rev.</td>
|
||||
* <th>Date</td>
|
||||
* <th>Comments</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>42110E</td>
|
||||
* <td>09/2015</td>
|
||||
* <td>Add SAM C21 and SAM DA1 support</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>42110D</td>
|
||||
* <td>12/2014</td>
|
||||
* <td>Add SAM D10/D11 support</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>42110C</td>
|
||||
* <td>01/2014</td>
|
||||
* <td>Add SAM D21 support</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>42110B</td>
|
||||
* <td>06/2013</td>
|
||||
* <td>Added additional documentation on the event system. Corrected
|
||||
* documentation typos.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>42110A</td>
|
||||
* <td>06/2013</td>
|
||||
* <td>Initial document release</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* DAC_FEATURE_H_INCLUDED */
|
||||
|
||||
|
|
@ -52,17 +52,28 @@
|
|||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: ADC - Analog-to-Digital Converter (Callback APIs)
|
||||
#include <adc.h>
|
||||
#include <adc_callback.h>
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: DAC - Digital-to-Analog Converter (Callback APIs)
|
||||
#include <dac.h>
|
||||
#include <dac_callback.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: EXTINT - External Interrupt (Callback APIs)
|
||||
//#include <extint.h>
|
||||
//#include <extint_callback.h>
|
||||
#include <extint.h>
|
||||
#include <extint_callback.h>
|
||||
|
||||
// From module: FreeRTOS - kernel 10.0.0
|
||||
#include <FreeRTOS.h>
|
||||
//#include <StackMacros.h>
|
||||
#include <StackMacros.h>
|
||||
#include <croutine.h>
|
||||
#include <deprecated_definitions.h>
|
||||
#include <event_groups.h>
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ to exclude the API function. */
|
|||
#define INCLUDE_vTaskDelay 1
|
||||
#define INCLUDE_eTaskGetState 0
|
||||
#define INCLUDE_xTimerPendFunctionCall 0
|
||||
|
||||
#define INCLUDE_uxTaskGetStackHighWaterMark 1
|
||||
/* Cortex-M specific definitions. */
|
||||
#ifdef __NVIC_PRIO_BITS
|
||||
/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#define CONF_BOARD_H_INCLUDED
|
||||
|
||||
/* Enable USB VBUS detect */
|
||||
#define CONF_BOARD_USB_VBUS_DETECT
|
||||
//#define CONF_BOARD_USB_VBUS_DETECT
|
||||
//temp-ctrl-v1.0b
|
||||
#define LED_PIN PIN_PA28
|
||||
#define LED0_PIN LED_PIN
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@
|
|||
#define UDI_CDC_RX_NOTIFY(port) //uart_rx_notify(port)
|
||||
#define UDI_CDC_TX_EMPTY_NOTIFY(port)
|
||||
#define UDI_CDC_SET_CODING_EXT(port,cfg) //uart_config(port,cfg)
|
||||
#define UDI_CDC_SET_DTR_EXT(port,set) main_cdc_set_dtr(port,set)
|
||||
#define UDI_CDC_SET_DTR_EXT(port,set) //main_cdc_set_dtr(port,set)
|
||||
#define UDI_CDC_SET_RTS_EXT(port,set)
|
||||
|
||||
//! Define it when the transfer CDC Device to Host is a low rate (<512000 bauds)
|
||||
|
|
@ -144,6 +144,7 @@
|
|||
//@}
|
||||
//@}
|
||||
|
||||
//#define USB_DEVICE_ATTACH_AUTO_DISABLE
|
||||
|
||||
/**
|
||||
* USB Device Driver Configuration
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* adc.c
|
||||
*
|
||||
* Created: 03.01.2021 23:33:58
|
||||
* Author: Lexus
|
||||
*/
|
||||
#include "adc_user.h"
|
||||
#include "adc.h"
|
||||
struct adc_module adc_instance;
|
||||
// init ADC
|
||||
void configure_adc(void)
|
||||
{
|
||||
struct adc_config config_adc;
|
||||
adc_get_config_defaults(&config_adc);
|
||||
|
||||
config_adc.positive_input = ADC_POSITIVE_INPUT_PIN1;
|
||||
config_adc.negative_input = ADC_NEGATIVE_INPUT_GND;
|
||||
config_adc.reference = ADC_REFERENCE_INTVCC0;
|
||||
|
||||
config_adc.resolution = ADC_RESOLUTION_12BIT;
|
||||
config_adc.gain_factor = ADC_GAIN_FACTOR_1X;
|
||||
config_adc.gain_factor = ADC_GAIN_FACTOR_DIV2;
|
||||
config_adc.clock_prescaler = ADC_CLOCK_PRESCALER_DIV512; // prescaler influence to accuracy of measures. Don't set less then 32
|
||||
|
||||
adc_init(&adc_instance, ADC, &config_adc);
|
||||
|
||||
adc_enable(&adc_instance);
|
||||
}
|
||||
|
||||
uint16_t adc_read_value(void){
|
||||
adc_start_conversion(&adc_instance);
|
||||
uint16_t result;
|
||||
do {
|
||||
/* Wait for conversion to be done and read out result */
|
||||
} while (adc_read(&adc_instance, &result) == STATUS_BUSY);
|
||||
return result;
|
||||
}
|
||||
|
||||
uint16_t adc_read_value_spec(ADC_chan_t chan)
|
||||
{
|
||||
adc_set_positive_input(&adc_instance, chan);
|
||||
return adc_read_value();
|
||||
}
|
||||
|
||||
float adc_get_Q(uint16_t value){
|
||||
float gane_factor=0.5;
|
||||
float vref_k=1.0/1.48;
|
||||
float ADC_range = 4096.0;
|
||||
return (value*vref_k)/(gane_factor*ADC_range);
|
||||
}
|
||||
|
||||
float adc_get_V(uint16_t value){
|
||||
float Uvcc=3.3;
|
||||
return adc_get_Q(value) * Uvcc;
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* dac_user.h
|
||||
*
|
||||
* Created: 04.01.2021 0:51:22
|
||||
* Author: Lexus
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DAC_USER_H_
|
||||
#define DAC_USER_H_
|
||||
|
||||
void configure_dac_channel(void)
|
||||
|
||||
#endif /* DAC_USER_H_ */
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* realsence.h
|
||||
*
|
||||
* Created: 03.01.2021 22:39:13
|
||||
* Author: Lexus
|
||||
*/
|
||||
|
||||
|
||||
#ifndef REALSENCE_H_
|
||||
#define REALSENCE_H_
|
||||
|
||||
void rs_configure_port_pins(void);
|
||||
void rs_set(bool value);
|
||||
|
||||
#endif /* REALSENCE_H_ */
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* tmpgood.h
|
||||
*
|
||||
* Created: 03.01.2021 23:22:32
|
||||
* Author: Lexus
|
||||
*/
|
||||
|
||||
|
||||
#ifndef TMPGOOD_H_
|
||||
#define TMPGOOD_H_
|
||||
|
||||
void tmpgood_configure_port_pins(void)
|
||||
bool tmpgood_get_state(void)
|
||||
|
||||
#endif /* TMPGOOD_H_ */
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* ws2812.h
|
||||
*
|
||||
* Created: 03.01.2021 23:01:08
|
||||
* Author: Lexus
|
||||
*/
|
||||
|
||||
|
||||
#ifndef WS2812_H_
|
||||
#define WS2812_H_
|
||||
|
||||
void ws2812_configure_port_pins(void)
|
||||
|
||||
#endif /* WS2812_H_ */
|
||||
|
|
@ -39,8 +39,18 @@
|
|||
#include "ui.h"
|
||||
#include "uart.h"
|
||||
#include <string.h>
|
||||
//#include <stdlib.h>
|
||||
#include "realsence.h"
|
||||
|
||||
#define PORT_STDIO 0
|
||||
#define PORT_DATA 1
|
||||
|
||||
//char rcvBuff[128] = {0};
|
||||
char str[128] = {0};
|
||||
UBaseType_t uxHighWaterMark_cdc_rx_check;
|
||||
UBaseType_t uxHighWaterMark_led_blink;
|
||||
static volatile bool main_b_cdc_enable = false;
|
||||
|
||||
void prvGetRegistersFromStack (uint32_t *pulFaultStackAddress);
|
||||
void led_configure_port_pins(void);
|
||||
void vApplicationMallocFailedHook (void);
|
||||
|
|
@ -66,12 +76,11 @@ int main(void)
|
|||
#else
|
||||
system_init();
|
||||
#endif
|
||||
|
||||
|
||||
// Start USB stack to authorize VBus monitoring
|
||||
InitTask_cdc_rx_check();
|
||||
// Init LED
|
||||
InitTask_led_blink();
|
||||
//ui_init();//ui_powerdown();
|
||||
InitTask_led_blink();//ui_init();//ui_powerdown();
|
||||
|
||||
vTaskStartScheduler();
|
||||
while(true){
|
||||
|
|
@ -82,49 +91,55 @@ int main(void)
|
|||
void Task_cdc_rx_check(void *parameters)
|
||||
{
|
||||
#define PORT0 0
|
||||
//volatile uint8_t led = 1;
|
||||
char rcvBuff[128] = {0};
|
||||
char *pStr = rcvBuff;
|
||||
int len = 0;
|
||||
iram_size_t len = 0;
|
||||
uxHighWaterMark_cdc_rx_check = uxTaskGetStackHighWaterMark( NULL );
|
||||
|
||||
while(true)
|
||||
{
|
||||
while(udi_cdc_multi_is_rx_ready(PORT0))
|
||||
{
|
||||
len += sprintf(pStr++, "%c", udi_cdc_multi_getc(PORT0));
|
||||
{
|
||||
if(main_b_cdc_enable &&
|
||||
(len = udi_cdc_multi_get_nb_received_data(PORT0)) > 0 &&
|
||||
udi_cdc_read_no_polling(str, (len<=128)?len:128) > 0 )
|
||||
{
|
||||
str[len]=0;
|
||||
printf("<%s\n", str);
|
||||
}
|
||||
if(len>0)
|
||||
{
|
||||
printf("<%s\n", rcvBuff);
|
||||
len=0;
|
||||
pStr = rcvBuff;
|
||||
}
|
||||
//cdc_rx_check();
|
||||
|
||||
/*#if !defined (DEBUG_CPU_IRQ_DISABLE)
|
||||
cpu_irq_disable();
|
||||
#endif
|
||||
bool _tc_callback_flag = tc_callback_flag;
|
||||
#if !defined (DEBUG_CPU_IRQ_DISABLE)
|
||||
cpu_irq_enable();
|
||||
#endif */
|
||||
/*if(_tc_callback_flag){
|
||||
tc_callback_flag=false;
|
||||
periodic_event_100ms();
|
||||
}*/
|
||||
uxHighWaterMark_cdc_rx_check = uxTaskGetStackHighWaterMark( NULL );
|
||||
}
|
||||
}
|
||||
|
||||
/*void Task_cdc_rx_check(void *parameters)
|
||||
{
|
||||
#define PORT0 0
|
||||
char rcvBuf[128];
|
||||
char *pStr = rcvBuf;
|
||||
int len=0;
|
||||
uxHighWaterMark_cdc_rx_check = uxTaskGetStackHighWaterMark( NULL );
|
||||
|
||||
while(true)
|
||||
{
|
||||
if (main_b_cdc_enable)
|
||||
{
|
||||
int symb = udi_cdc_getc();
|
||||
if(symb)
|
||||
{
|
||||
len += sprintf(pStr++, "%c", symb);
|
||||
}
|
||||
if(symb == '\n')
|
||||
{
|
||||
udi_cdc_write_buf(rcvBuf, len);
|
||||
pStr = rcvBuf;
|
||||
len = 0;
|
||||
}
|
||||
}
|
||||
uxHighWaterMark_cdc_rx_check = uxTaskGetStackHighWaterMark( NULL );
|
||||
}
|
||||
}*/
|
||||
void InitTask_cdc_rx_check(void)
|
||||
{
|
||||
// Enable USB Stack Device
|
||||
udc_start();
|
||||
if (!udc_include_vbus_monitoring())
|
||||
{
|
||||
udc_attach();
|
||||
}
|
||||
stdio_usb_init();
|
||||
// Enable USB Stack Device
|
||||
stdio_usb_init();//udc_start();
|
||||
stdio_usb_enable();
|
||||
xTaskCreate(Task_cdc_rx_check, (const char*)"Task_cdc_rx_check", configMINIMAL_STACK_SIZE*2, NULL,configMAX_PRIORITIES-1, NULL);
|
||||
|
||||
xTaskCreate(Task_cdc_rx_check, (const char*)"Task_cdc_rx_check", configMINIMAL_STACK_SIZE*3, NULL,configMAX_PRIORITIES-1, NULL);
|
||||
}
|
||||
|
||||
void Task_led_blink(void *parameters)
|
||||
|
|
@ -132,11 +147,13 @@ void Task_led_blink(void *parameters)
|
|||
//long int c1=0;
|
||||
//long int c2=0;
|
||||
int cnt=0;
|
||||
|
||||
/* Inspect our own high water mark on entering the task. */
|
||||
uxHighWaterMark_led_blink = uxTaskGetStackHighWaterMark( NULL );
|
||||
while(1)
|
||||
{
|
||||
printf(">%u sec\n\r", 10*(cnt++));//// stdio_usb_putchar (NULL, "data");//
|
||||
vTaskDelay(10000);
|
||||
if (main_b_cdc_enable && udi_cdc_multi_is_tx_ready(PORT0))
|
||||
printf(">%u sec\n\r", (cnt++));//// stdio_usb_putchar (NULL, "data");//
|
||||
vTaskDelay(1000);
|
||||
LED_Toggle(LED_PIN);
|
||||
/*if((c1 % 50000) == 0){
|
||||
//periodic_event_1s();
|
||||
|
|
@ -156,6 +173,7 @@ void Task_led_blink(void *parameters)
|
|||
c2++;
|
||||
}
|
||||
c1++;*/
|
||||
uxHighWaterMark_led_blink = uxTaskGetStackHighWaterMark( NULL );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -217,7 +235,7 @@ void main_cdc_disable(uint8_t port)
|
|||
uart_close(port);
|
||||
}
|
||||
|
||||
void main_cdc_set_dtr(uint8_t port, bool b_enable)
|
||||
/*void main_cdc_set_dtr(uint8_t port, bool b_enable)
|
||||
{
|
||||
if (b_enable) {
|
||||
// Host terminal has open COM
|
||||
|
|
@ -226,6 +244,21 @@ void main_cdc_set_dtr(uint8_t port, bool b_enable)
|
|||
// Host terminal has close COM
|
||||
ui_com_close(port);
|
||||
}
|
||||
}*/
|
||||
void main_cdc_set_dtr(uint8_t port, bool b_enable)
|
||||
{
|
||||
if(port == PORT_STDIO){
|
||||
if (b_enable) {
|
||||
// Host terminal has open COM
|
||||
stdio_usb_enable();
|
||||
//stdio_cdc_opened=true;
|
||||
}else{
|
||||
// Host terminal has close COM
|
||||
stdio_usb_disable();
|
||||
//stdio_cdc_opened=false;
|
||||
}
|
||||
printf("main_cdc_set_dtr(): %d\r\n", b_enable);
|
||||
}
|
||||
}
|
||||
|
||||
void led_configure_port_pins(void)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* adc.h
|
||||
*
|
||||
* Created: 03.01.2021 23:34:13
|
||||
* Author: Lexus
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ADC_H_
|
||||
#define ADC_H_
|
||||
|
||||
#define chan_NTC_MCU ADC_POSITIVE_INPUT_PIN1
|
||||
#define chan_NTC_TEC ADC_POSITIVE_INPUT_PIN5
|
||||
#define chan_LFB ADC_POSITIVE_INPUT_PIN19
|
||||
#define chan_CS ADC_POSITIVE_INPUT_PIN4
|
||||
#define chan_SFB ADC_POSITIVE_INPUT_PIN18
|
||||
#define chan_VTEC ADC_POSITIVE_INPUT_PIN6
|
||||
#define chan_ITEC ADC_POSITIVE_INPUT_PIN7
|
||||
|
||||
typedef enum adc_positive_input ADC_chan_t;
|
||||
|
||||
void configure_adc(void)
|
||||
uint16_t adc_read_value(void)
|
||||
float adc_get_V(uint16_t value)
|
||||
float adc_get_Q(uint16_t value)
|
||||
uint16_t adc_read_value_spec(ADC_chan_t);
|
||||
float adc_get_V_spec(ADC_chan_t chan);
|
||||
#endif /* ADC_H_ */
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* dac_user.c
|
||||
*
|
||||
* Created: 04.01.2021 0:51:07
|
||||
* Author: Lexus
|
||||
*/
|
||||
#include "dac_user.h"
|
||||
struct dac_module dac_instance;
|
||||
void configure_dac_channel(void)
|
||||
{
|
||||
struct dac_chan_config config_dac_chan;
|
||||
dac_chan_get_config_defaults(&config_dac_chan);
|
||||
dac_chan_set_config(&dac_instance, DAC_CHANNEL_0, &config_dac_chan);
|
||||
dac_chan_enable(&dac_instance, DAC_CHANNEL_0);
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* realsence.c
|
||||
*
|
||||
* Created: 03.01.2021 22:38:09
|
||||
* Author: Lexus
|
||||
*/
|
||||
#include "realsence.h"
|
||||
bool rs_power;
|
||||
|
||||
void rs_configure_port_pins(void)
|
||||
{
|
||||
struct port_config config_port_pin;
|
||||
port_get_config_defaults(&config_port_pin);
|
||||
config_port_pin.direction = PORT_PIN_DIR_OUTPUT;
|
||||
config_port_pin.input_pull = PORT_PIN_PULL_NONE;
|
||||
port_pin_set_config(PIN_RS_POWER, &config_port_pin);
|
||||
}
|
||||
|
||||
void rs_set(bool value){
|
||||
port_pin_set_output_level(PIN_RS_POWER, value?0:1);
|
||||
rs_power = value;
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* tmpgood.c
|
||||
*
|
||||
* Created: 03.01.2021 23:22:04
|
||||
* Author: Lexus
|
||||
*/
|
||||
void tmpgood_configure_port_pins(void)
|
||||
{
|
||||
struct port_config config_port_pin;
|
||||
port_get_config_defaults(&config_port_pin);
|
||||
config_port_pin.direction = PORT_PIN_DIR_INPUT;
|
||||
config_port_pin.input_pull = PORT_PIN_PULL_NONE;
|
||||
port_pin_set_config(TC_TMPGD, &config_port_pin);
|
||||
}
|
||||
|
||||
bool tmpgood_get_state(void)
|
||||
{
|
||||
return port_pin_get_input_level(TC_TMPGD);
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* ws2812.c
|
||||
*
|
||||
* Created: 03.01.2021 23:00:57
|
||||
* Author: Lexus
|
||||
*/
|
||||
|
||||
void ws2812_configure_port_pins(void)
|
||||
{
|
||||
struct port_config config_port_pin;
|
||||
port_get_config_defaults(&config_port_pin);
|
||||
config_port_pin.direction = PORT_PIN_DIR_OUTPUT;
|
||||
config_port_pin.input_pull = PORT_PIN_PULL_NONE;
|
||||
port_pin_set_config(PIN_WS2812, &config_port_pin);
|
||||
}
|
||||
Loading…
Reference in New Issue