aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-12-31 09:33:20 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-12-31 09:33:20 +0000
commit6a0fb115c3242e00e374488e57a95b1f098845b2 (patch)
treec0c8766632b603737e1c8091ae120425570deb31 /os/hal/platforms
parent19f97afd4d34430062ba5667df170f97772462a0 (diff)
downloadChibiOS-6a0fb115c3242e00e374488e57a95b1f098845b2.tar.gz
ChibiOS-6a0fb115c3242e00e374488e57a95b1f098845b2.tar.bz2
ChibiOS-6a0fb115c3242e00e374488e57a95b1f098845b2.zip
First tests running and working.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5002 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms')
-rw-r--r--os/hal/platforms/STM32F3xx/adc_lld.c5
-rw-r--r--os/hal/platforms/STM32F3xx/adc_lld.h14
2 files changed, 9 insertions, 10 deletions
diff --git a/os/hal/platforms/STM32F3xx/adc_lld.c b/os/hal/platforms/STM32F3xx/adc_lld.c
index 22b5bfcad..0d5bed09d 100644
--- a/os/hal/platforms/STM32F3xx/adc_lld.c
+++ b/os/hal/platforms/STM32F3xx/adc_lld.c
@@ -474,14 +474,13 @@ void adc_lld_start_conversion(ADCDriver *adcp) {
dmamode = adcp->dmamode;
ccr = grpp->ccr | (adcp->adcc->CCR & (ADC_CCR_CKMODE_MASK |
ADC_CCR_MDMA_MASK));
- cfgr = grpp->cfgr;
+ cfgr = grpp->cfgr | ADC_CFGR_CONT | ADC_CFGR_DMAEN;
if (grpp->circular) {
dmamode |= STM32_DMA_CR_CIRC;
#if STM32_ADC_DUAL_MODE
ccr |= ADC_CCR_DMACFG_CIRCULAR;
- cfgr |= ADC_CFGR_CONT;
#else
- cfgr |= ADC_CFGR_CONT | ADC_CFGR_DMACFG_CIRCULAR | ADC_CFGR_DMAEN;
+ cfgr |= ADC_CFGR_DMACFG_CIRCULAR;
#endif
}
diff --git a/os/hal/platforms/STM32F3xx/adc_lld.h b/os/hal/platforms/STM32F3xx/adc_lld.h
index 140033a77..127678595 100644
--- a/os/hal/platforms/STM32F3xx/adc_lld.h
+++ b/os/hal/platforms/STM32F3xx/adc_lld.h
@@ -84,13 +84,6 @@
/** @} */
/**
- * @name Threashold register initializer
- * @{
- */
-#define ADC_TR(low, high) (((uint32_t)(high) << 16) | (uint32_t)(low))
-/** @} */
-
-/**
* @name CFGR register configuration helpers
* @{
*/
@@ -531,6 +524,13 @@ struct ADCDriver {
/*===========================================================================*/
/**
+ * @name Threashold register initializer
+ * @{
+ */
+#define ADC_TR(low, high) (((uint32_t)(high) << 16) | (uint32_t)(low))
+/** @} */
+
+/**
* @name Sequences building helper macros
* @{
*/