aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-03-07 13:33:42 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-03-07 13:33:42 +0000
commitd2e3d96b8d5305c9e74a762b22abe403dd726ec2 (patch)
treee6c0996517699031b5aa80a58ad3617b3b2db7e1 /os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.c
parent1d6fc52f437be05281f46ceb25d084a786a4d9a2 (diff)
downloadChibiOS-d2e3d96b8d5305c9e74a762b22abe403dd726ec2.tar.gz
ChibiOS-d2e3d96b8d5305c9e74a762b22abe403dd726ec2.tar.bz2
ChibiOS-d2e3d96b8d5305c9e74a762b22abe403dd726ec2.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5375 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.c')
-rw-r--r--os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.c b/os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.c
index 309ba008f..78db56c3b 100644
--- a/os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.c
+++ b/os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.c
@@ -69,7 +69,8 @@ CH_IRQ_HANDLER(vector10) {
/* If the channel is not associated then the error is simply discarded
else the error callback is invoked.*/
- if (channels[channel] != NULL)
+ if ((channels[channel] != NULL) &&
+ (channels[channel]->dma_error_func != NULL))
channels[channel]->dma_error_func(channel,
channels[channel]->dma_param,
esr);
@@ -695,8 +696,7 @@ edma_channel_t edmaChannelAllocate(const edma_channel_config_t *ccfg) {
edma_channel_t channel;
chDbgCheck((ccfg != NULL) && ((ccfg->dma_prio & 15) < 16) &&
- (ccfg->dma_irq_prio < 16) &&
- (ccfg->dma_func != NULL) && (ccfg->dma_error_func != NULL),
+ (ccfg->dma_irq_prio < 16),
"edmaChannelAllocate");
#if SPC5_EDMA_HAS_MUX