Fixed bug #773.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9750 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
86e78cd9c4
commit
f19b4e536c
|
@ -221,6 +221,8 @@ void dac_lld_start(DACDriver *dacp) {
|
||||||
/* If the driver is in DAC_STOP state then a full initialization is
|
/* If the driver is in DAC_STOP state then a full initialization is
|
||||||
required.*/
|
required.*/
|
||||||
if (dacp->state == DAC_STOP) {
|
if (dacp->state == DAC_STOP) {
|
||||||
|
dacchannel_t channel = 0;
|
||||||
|
|
||||||
/* Enabling the clock source.*/
|
/* Enabling the clock source.*/
|
||||||
#if STM32_DAC_USE_DAC1_CH1
|
#if STM32_DAC_USE_DAC1_CH1
|
||||||
if (&DACD1 == dacp) {
|
if (&DACD1 == dacp) {
|
||||||
|
@ -231,6 +233,7 @@ void dac_lld_start(DACDriver *dacp) {
|
||||||
#if STM32_DAC_USE_DAC1_CH2
|
#if STM32_DAC_USE_DAC1_CH2
|
||||||
if (&DACD2 == dacp) {
|
if (&DACD2 == dacp) {
|
||||||
rccEnableDAC1(false);
|
rccEnableDAC1(false);
|
||||||
|
channel = 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -243,6 +246,7 @@ void dac_lld_start(DACDriver *dacp) {
|
||||||
#if STM32_DAC_USE_DAC2_CH2
|
#if STM32_DAC_USE_DAC2_CH2
|
||||||
if (&DACD3 == dacp) {
|
if (&DACD3 == dacp) {
|
||||||
rccEnableDAC2(false);
|
rccEnableDAC2(false);
|
||||||
|
channel = 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -251,7 +255,7 @@ void dac_lld_start(DACDriver *dacp) {
|
||||||
#if STM32_DAC_DUAL_MODE == FALSE
|
#if STM32_DAC_DUAL_MODE == FALSE
|
||||||
dacp->params->dac->CR &= dacp->params->regmask;
|
dacp->params->dac->CR &= dacp->params->regmask;
|
||||||
dacp->params->dac->CR |= DAC_CR_EN1 << dacp->params->regshift;
|
dacp->params->dac->CR |= DAC_CR_EN1 << dacp->params->regshift;
|
||||||
dac_lld_put_channel(dacp, 0U, dacp->config->init);
|
dac_lld_put_channel(dacp, channel, dacp->config->init);
|
||||||
#else
|
#else
|
||||||
if ((dacp->config->datamode == DAC_DHRM_12BIT_RIGHT_DUAL) ||
|
if ((dacp->config->datamode == DAC_DHRM_12BIT_RIGHT_DUAL) ||
|
||||||
(dacp->config->datamode == DAC_DHRM_12BIT_LEFT_DUAL) ||
|
(dacp->config->datamode == DAC_DHRM_12BIT_LEFT_DUAL) ||
|
||||||
|
@ -262,7 +266,7 @@ void dac_lld_start(DACDriver *dacp) {
|
||||||
else {
|
else {
|
||||||
dacp->params->dac->CR = DAC_CR_EN1;
|
dacp->params->dac->CR = DAC_CR_EN1;
|
||||||
}
|
}
|
||||||
dac_lld_put_channel(dacp, 0U, dacp->config->init);
|
dac_lld_put_channel(dacp, channel, dacp->config->init);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,6 +123,8 @@
|
||||||
- RT: Merged RT4.
|
- RT: Merged RT4.
|
||||||
- NIL: Merged NIL2.
|
- NIL: Merged NIL2.
|
||||||
- NIL: Added STM32F7 demo.
|
- NIL: Added STM32F7 demo.
|
||||||
|
- HAL: Fixed invalid output initialization for STM32 DACx channels 2
|
||||||
|
(bug #772)(backported to 16.1.6).
|
||||||
- HAL: Fixed CAN inclusion path missing for STM32F107 (bug #772)(backported
|
- HAL: Fixed CAN inclusion path missing for STM32F107 (bug #772)(backported
|
||||||
to 16.1.6).
|
to 16.1.6).
|
||||||
- HAL: Fixed extra brackets in STM32F0 registry (bug #771)(backported
|
- HAL: Fixed extra brackets in STM32F0 registry (bug #771)(backported
|
||||||
|
|
Loading…
Reference in New Issue