git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5351 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
8fa38496b7
commit
e47644864d
|
@ -41,6 +41,8 @@
|
|||
/* Driver local variables and types. */
|
||||
/*===========================================================================*/
|
||||
|
||||
static edma_channel_config_t channels[SPC5_EDMA_NCHANNELS];
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver local functions. */
|
||||
/*===========================================================================*/
|
||||
|
@ -67,22 +69,22 @@ void edmaInit(void) {
|
|||
*
|
||||
* @param[in] ccfg channel configuration
|
||||
* @return The channel TCD pointer.
|
||||
* @retval NULL if the channel cannot be allocated.
|
||||
* @retval EDMA_ERROR if the channel cannot be allocated.
|
||||
*
|
||||
* @special
|
||||
*/
|
||||
edma_tcd_t *edmaAllocChannel(const edma_channel_config_t *ccfg) {
|
||||
edma_channel_t edmaAllocChannel(const edma_channel_config_t *ccfg) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief EDMA channel allocation.
|
||||
*
|
||||
* @param[in] tcd channel TCD pointer
|
||||
* @param[in] channel the channel number
|
||||
*
|
||||
* @special
|
||||
*/
|
||||
void edmaReleaseChannel(edma_tcd_t *tcd) {
|
||||
void edmaReleaseChannel(edma_channel_t channel) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,11 @@
|
|||
/* Driver constants. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief EDMA channel allocation error.
|
||||
*/
|
||||
#define EDMA_ERROR -1
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver pre-compile time settings. */
|
||||
/*===========================================================================*/
|
||||
|
@ -45,6 +50,11 @@
|
|||
/* Driver data structures and types. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Type of and EDMA channel number.
|
||||
*/
|
||||
typedef int32_t edma_channel_t;
|
||||
|
||||
/**
|
||||
* @brief Type of an EDMA TCD.
|
||||
*/
|
||||
|
@ -64,11 +74,10 @@ typedef void (*edma_isr_t)(edma_tcd_t *tcd, void *p);
|
|||
* @brief Type of an EDMA channel configuration structure.
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t dma_periph; /**< @brief Peripheral associated to
|
||||
the channel. */
|
||||
uint32_t dma_periph; /**< @brief Peripheral to be
|
||||
associated to the channel. */
|
||||
edma_isr_t dma_func; /**< @brief Channel ISR callback. */
|
||||
void *dma_param; /**< @brief Channel callback param. */
|
||||
|
||||
} edma_channel_config_t;
|
||||
|
||||
/*===========================================================================*/
|
||||
|
@ -83,8 +92,8 @@ typedef struct {
|
|||
extern "C" {
|
||||
#endif
|
||||
void edmaInit(void);
|
||||
edma_tcd_t *edmaAllocChannel(const edma_channel_config_t *ccfg);
|
||||
void edmaReleaseChannel(edma_tcd_t *tcd);
|
||||
edma_channel_t edmaAllocChannel(const edma_channel_config_t *ccfg);
|
||||
void edmaReleaseChannel(edma_channel_t *channel);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue