git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4132 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
86153d2f0a
commit
010f8f1b07
|
@ -189,20 +189,17 @@ void extSetChannelModeI(EXTDriver *extp,
|
||||||
chDbgCheck((extp != NULL) && (channel < EXT_MAX_CHANNELS) &&
|
chDbgCheck((extp != NULL) && (channel < EXT_MAX_CHANNELS) &&
|
||||||
(extcp != NULL), "extSetChannelModeI");
|
(extcp != NULL), "extSetChannelModeI");
|
||||||
|
|
||||||
|
chDbgAssert(extp->state == EXT_ACTIVE,
|
||||||
|
"extSetChannelModeI(), #1", "invalid state");
|
||||||
|
|
||||||
/* Note that here the access is enforced as non-const, known access
|
/* Note that here the access is enforced as non-const, known access
|
||||||
violation.*/
|
violation.*/
|
||||||
oldcp = (EXTChannelConfig *)&extp->config->channels[channel];
|
oldcp = (EXTChannelConfig *)&extp->config->channels[channel];
|
||||||
|
|
||||||
chSysLock();
|
|
||||||
|
|
||||||
chDbgAssert(extp->state == EXT_ACTIVE,
|
|
||||||
"extSetChannelModeI(), #1", "invalid state");
|
|
||||||
|
|
||||||
/* Overwiting the old channels configuration then the channel is reconfigured
|
/* Overwiting the old channels configuration then the channel is reconfigured
|
||||||
by the low level driver.*/
|
by the low level driver.*/
|
||||||
*oldcp = *extcp;
|
*oldcp = *extcp;
|
||||||
ext_lld_channel_enable(extp, channel);
|
ext_lld_channel_enable(extp, channel);
|
||||||
chSysUnlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAL_USE_EXT */
|
#endif /* HAL_USE_EXT */
|
||||||
|
|
Loading…
Reference in New Issue