git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6762 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
aa5e4b5e81
commit
348784fdf2
|
@ -48,6 +48,7 @@
|
||||||
#include "pal.h"
|
#include "pal.h"
|
||||||
#include "adc.h"
|
#include "adc.h"
|
||||||
#include "can.h"
|
#include "can.h"
|
||||||
|
#include "dac.h"
|
||||||
#include "ext.h"
|
#include "ext.h"
|
||||||
#include "gpt.h"
|
#include "gpt.h"
|
||||||
#include "i2c.h"
|
#include "i2c.h"
|
||||||
|
|
|
@ -163,7 +163,7 @@
|
||||||
* @note This option is only available on platforms with enhanced DMA.
|
* @note This option is only available on platforms with enhanced DMA.
|
||||||
*/
|
*/
|
||||||
#if !defined(STM32_DAC_CHN1_DMA_STREAM) || defined(__DOXYGEN__)
|
#if !defined(STM32_DAC_CHN1_DMA_STREAM) || defined(__DOXYGEN__)
|
||||||
#define STM32_DAC_CHN1_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
#define STM32_DAC_CHN1_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -171,7 +171,7 @@
|
||||||
* @note This option is only available on platforms with enhanced DMA.
|
* @note This option is only available on platforms with enhanced DMA.
|
||||||
*/
|
*/
|
||||||
#if !defined(STM32_DAC_CHN2_DMA_STREAM) || defined(__DOXYGEN__)
|
#if !defined(STM32_DAC_CHN2_DMA_STREAM) || defined(__DOXYGEN__)
|
||||||
#define STM32_DAC_CHN2_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
#define STM32_DAC_CHN2_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -179,7 +179,7 @@
|
||||||
* @note This option is only available on platforms with enhanced DMA.
|
* @note This option is only available on platforms with enhanced DMA.
|
||||||
*/
|
*/
|
||||||
#if !defined(STM32_DAC_CHN3_DMA_STREAM) || defined(__DOXYGEN__)
|
#if !defined(STM32_DAC_CHN3_DMA_STREAM) || defined(__DOXYGEN__)
|
||||||
#define STM32_DAC_CHN3_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
|
#define STM32_DAC_CHN3_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -202,6 +202,23 @@
|
||||||
#error "DAC driver activated but no DAC peripheral assigned"
|
#error "DAC driver activated but no DAC peripheral assigned"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* The following checks are only required when there is a DMA able to
|
||||||
|
reassign streams to different channels.*/
|
||||||
|
#if STM32_ADVANCED_DMA
|
||||||
|
/* Check on the presence of the DMA streams settings in mcuconf.h.*/
|
||||||
|
#if STM32_DAC_USE_CHN1 && !defined(STM32_DAC_CHN1_DMA_STREAM)
|
||||||
|
#error "DAC1 CHN1 DMA stream not defined"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if STM32_DAC_USE_CHN2 && !defined(STM32_DAC_CHN2_DMA_STREAM)
|
||||||
|
#error "DAC1 CHN2 DMA stream not defined"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if STM32_DAC_USE_CHN3 && !defined(STM32_DAC_CHN3_DMA_STREAM)
|
||||||
|
#error "DAC1 CHN3 DMA stream not defined"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Check on the validity of the assigned DMA channels.*/
|
||||||
#if STM32_DAC_USE_CHN1 && \
|
#if STM32_DAC_USE_CHN1 && \
|
||||||
!STM32_DMA_IS_VALID_ID(STM32_DAC_CHN1_DMA_STREAM, STM32_DAC_CHN1_DMA_MSK)
|
!STM32_DMA_IS_VALID_ID(STM32_DAC_CHN1_DMA_STREAM, STM32_DAC_CHN1_DMA_MSK)
|
||||||
#error "invalid DMA stream associated to DAC CHN1"
|
#error "invalid DMA stream associated to DAC CHN1"
|
||||||
|
@ -216,6 +233,7 @@
|
||||||
!STM32_DMA_IS_VALID_ID(STM32_DAC_CHN3_DMA_STREAM, STM32_DAC_CHN3_DMA_MSK)
|
!STM32_DMA_IS_VALID_ID(STM32_DAC_CHN3_DMA_STREAM, STM32_DAC_CHN3_DMA_MSK)
|
||||||
#error "invalid DMA stream associated to DAC CHN3"
|
#error "invalid DMA stream associated to DAC CHN3"
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* STM32_ADVANCED_DMA */
|
||||||
|
|
||||||
#if !defined(STM32_DMA_REQUIRED)
|
#if !defined(STM32_DMA_REQUIRED)
|
||||||
#define STM32_DMA_REQUIRED
|
#define STM32_DMA_REQUIRED
|
||||||
|
|
|
@ -87,6 +87,19 @@
|
||||||
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
|
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
|
||||||
#define STM32_CAN_CAN2_IRQ_PRIORITY 11
|
#define STM32_CAN_CAN2_IRQ_PRIORITY 11
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DAC driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_DAC_USE_CHN1 TRUE
|
||||||
|
#define STM32_DAC_USE_CHN2 FALSE
|
||||||
|
#define STM32_DAC_CHN1_IRQ_PRIORITY 10
|
||||||
|
#define STM32_DAC_CHN2_IRQ_PRIORITY 10
|
||||||
|
#define STM32_DAC_CHN1_DMA_PRIORITY 2
|
||||||
|
#define STM32_DAC_CHN2_DMA_PRIORITY 2
|
||||||
|
#define STM32_DAC_DMA_ERROR_HOOK(dacp) osalSysHalt()
|
||||||
|
#define STM32_DAC_CHN1_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
||||||
|
#define STM32_DAC_CHN2_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* EXT driver system settings.
|
* EXT driver system settings.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue