diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-03-01 14:37:07 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-03-01 14:37:07 +0000 |
commit | 5e5983ce7dbe0f4f5df38670e561ab38075f4ea1 (patch) | |
tree | 7a33e37c694c1f1b88db4582b6fe1cabf2600842 | |
parent | 01f971ba1d63d8568789adf51cde22fb35f69e73 (diff) | |
download | ChibiOS-5e5983ce7dbe0f4f5df38670e561ab38075f4ea1.tar.gz ChibiOS-5e5983ce7dbe0f4f5df38670e561ab38075f4ea1.tar.bz2 ChibiOS-5e5983ce7dbe0f4f5df38670e561ab38075f4ea1.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5341 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/platforms/SPC563Mxx/spc563m_registry.h | 3 | ||||
-rw-r--r-- | os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.c | 24 | ||||
-rw-r--r-- | os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.h | 26 |
3 files changed, 36 insertions, 17 deletions
diff --git a/os/hal/platforms/SPC563Mxx/spc563m_registry.h b/os/hal/platforms/SPC563Mxx/spc563m_registry.h index bf2529c7a..757f88e0c 100644 --- a/os/hal/platforms/SPC563Mxx/spc563m_registry.h +++ b/os/hal/platforms/SPC563Mxx/spc563m_registry.h @@ -31,6 +31,9 @@ * @name SPC563Mxx capabilities
* @{
*/
+/* eDMA attributes.*/
+#define SPC5_EDMA_NCHANNELS 64
+
/* eQADC attributes.*/
#define SPC5_HAS_EQADC TRUE
#define SPC5_EQADC1_HANDLER vector146
diff --git a/os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.c b/os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.c index f2d9a58fa..7979c37a9 100644 --- a/os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.c +++ b/os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.c @@ -62,4 +62,28 @@ void edmaInit(void) { }
+/**
+ * @brief EDMA channel allocation.
+ *
+ * @param[in] ccfg channel configuration
+ * @return The channel TCD pointer.
+ * @retval NULL if the channel cannot be allocated.
+ *
+ * @special
+ */
+edma_tcd_t *edmaAllocChannel(const edma_channel_config_t *ccfg) {
+
+}
+
+/**
+ * @brief EDMA channel allocation.
+ *
+ * @param[in] tcd channel TCD pointer
+ *
+ * @special
+ */
+void edmaReleaseChannel(edma_tcd_t *tcd) {
+
+}
+
/** @} */
diff --git a/os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.h b/os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.h index 39508fa6b..3aa899122 100644 --- a/os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.h +++ b/os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.h @@ -37,19 +37,6 @@ /* Driver pre-compile time settings. */
/*===========================================================================*/
-/**
- * @name Configuration options
- * @{
- */
-/**
- * @brief XXX driver enable switch.
- * @details If set to @p TRUE the support for XXX1 is included.
- */
-#if !defined(PLATFORM_XXX_USE_XXX1) || defined(__DOXYGEN__)
-#define PLATFORM_XXX_USE_XXX1 FALSE
-#endif
-/** @} */
-
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/
@@ -73,11 +60,16 @@ typedef struct { */
typedef void (*edma_isr_t)(edma_tcd_t *tcd, void *p);
+/**
+ * @brief Type of an EDMA channel configuration structure.
+ */
typedef struct {
- stm32_dmaisr_t dma_func; /**< @brief DMA callback function. */
- void *dma_param; /**< @brief DMA callback parameter. */
+ uint32_t dma_periph; /**< @brief Peripheral associated to
+ the channel. */
+ edma_isr_t dma_func; /**< @brief Channel ISR callback. */
+ void *dma_param; /**< @brief Channel callback param. */
-} edma_channel_descriptor;
+} edma_channel_config_t;
/*===========================================================================*/
/* Driver macros. */
@@ -91,7 +83,7 @@ typedef struct { extern "C" {
#endif
void edmaInit(void);
- edma_tcd_t *edmaAllocChannel(uint32_t periph_id, edma_isr_t isr);
+ edma_tcd_t *edmaAllocChannel(const edma_channel_config_t *ccfg);
void edmaReleaseChannel(edma_tcd_t *tcd);
#ifdef __cplusplus
}
|