git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9363 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
Giovanni Di Sirio 2016-04-25 13:46:38 +00:00
parent f404a49fc3
commit f67bac27d3
2 changed files with 18 additions and 4 deletions

View File

@ -335,7 +335,11 @@ void dac_lld_put_channel(DACDriver *dacp,
case DAC_DHRM_12BIT_RIGHT_DUAL:
#endif
if (channel == 0U) {
#if STM32_DAC_DUAL_MODE
dacp->params->dac->DHR12R1 = (uint32_t)sample;
#else
*(&dacp->params->dac->DHR12R1 + dacp->params->dataoffset) = (uint32_t)sample;
#endif
}
else {
dacp->params->dac->DHR12R2 = (uint32_t)sample;
@ -346,7 +350,11 @@ void dac_lld_put_channel(DACDriver *dacp,
case DAC_DHRM_12BIT_LEFT_DUAL:
#endif
if (channel == 0U) {
#if STM32_DAC_DUAL_MODE
dacp->params->dac->DHR12L1 = (uint32_t)sample;
#else
*(&dacp->params->dac->DHR12L1 + dacp->params->dataoffset) = (uint32_t)sample;
#endif
}
else {
dacp->params->dac->DHR12L2 = (uint32_t)sample;
@ -357,10 +365,14 @@ void dac_lld_put_channel(DACDriver *dacp,
case DAC_DHRM_8BIT_RIGHT_DUAL:
#endif
if (channel == 0U) {
dacp->params->dac->DHR8R1 = (uint32_t)sample;
#if STM32_DAC_DUAL_MODE
dacp->params->dac->DHR8R1 = (uint32_t)sample;
#else
*(&dacp->params->dac->DHR8R1 + dacp->params->dataoffset) = (uint32_t)sample;
#endif
}
else {
dacp->params->dac->DHR8R2 = (uint32_t)sample;
dacp->params->dac->DHR8R2 = (uint32_t)sample;
}
break;
default:

View File

@ -110,9 +110,11 @@
- NIL: Merged NIL2.
- NIL: Added STM32F7 demo.
- HAL: Fixed missing SDC initialization in RT-STM32F103-OLIMEX_STM32_P103 demo
(bug #735)(backported to 16.1.4).
(bug #735)(backported to 16.1.5).
- HAL: Fixed STM32 dac bug when using only channel 2 in direct mode (bug #734)
(backported to 3.0.6 and 16.1.5).
- HAL: Fixed PAL lines support not working for STM32 GPIOv1 (bug #730)
(backported to 16.1.4).
(backported to 16.1.5).
- RT: Fixed bug in chSchPreemption() function (bug #728)(backported to 2.6.10,
3.0.6 and 16.1.5).
- HAL: Fixed prescaler not initialized in STM32 ADCv1 (bug #725)