git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5370 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2013-03-06 15:56:03 +00:00
parent 0f61b7caf5
commit 6de945e6aa
2 changed files with 34 additions and 38 deletions

View File

@ -1,22 +1,16 @@
/* /*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, * Licensed under ST Liberty SW License Agreement V2, (the "License");
2011,2012,2013 Giovanni Di Sirio. * You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
This file is part of ChibiOS/RT. *
* http://www.st.com/software_license_agreement_liberty_v2
ChibiOS/RT is free software; you can redistribute it and/or modify *
it under the terms of the GNU General Public License as published by * Unless required by applicable law or agreed to in writing, software
the Free Software Foundation; either version 3 of the License, or * distributed under the License is distributed on an "AS IS" BASIS,
(at your option) any later version. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
ChibiOS/RT is distributed in the hope that it will be useful, * limitations under the License.
but WITHOUT ANY WARRANTY; without even the implied warranty of */
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** /**
* @file SPC5xx/edma.c * @file SPC5xx/edma.c
@ -743,8 +737,13 @@ void edmaChannelRelease(edma_channel_t channel) {
"edmaChannelRelease(), #1", "edmaChannelRelease(), #1",
"not allocated"); "not allocated");
/* Error IRQ masked for the released channel.*/ /* Enforcing a stop.*/
edmaChannelStop(channel);
/* Clearing ISR sources for the channel.*/
EDMA.CIRQR.R = channel;
EDMA.CEEIR.R = channel; EDMA.CEEIR.R = channel;
EDMA.CER.R = channel;
/* The channels is flagged as available.*/ /* The channels is flagged as available.*/
channels[channel] = NULL; channels[channel] = NULL;

View File

@ -1,22 +1,16 @@
/* /*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, * Licensed under ST Liberty SW License Agreement V2, (the "License");
2011,2012,2013 Giovanni Di Sirio. * You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
This file is part of ChibiOS/RT. *
* http://www.st.com/software_license_agreement_liberty_v2
ChibiOS/RT is free software; you can redistribute it and/or modify *
it under the terms of the GNU General Public License as published by * Unless required by applicable law or agreed to in writing, software
the Free Software Foundation; either version 3 of the License, or * distributed under the License is distributed on an "AS IS" BASIS,
(at your option) any later version. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
ChibiOS/RT is distributed in the hope that it will be useful, * limitations under the License.
but WITHOUT ANY WARRANTY; without even the implied warranty of */
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** /**
* @file SPC5xx/edma.h * @file SPC5xx/edma.h
@ -279,7 +273,10 @@ typedef struct {
* *
* @api * @api
*/ */
#define edmaChannelStop(channel) (EDMA.CERQR.R = (channel)) #define edmaChannelStop(channel) { \
EDMA.CERQR.R = (channel); \
EDMA.CDSBR.R = (channel); \
}
/** /**
* @brief EDMA channel setup. * @brief EDMA channel setup.