summaryrefslogtreecommitdiff
path: root/src/stmf0/ao_adc_fast.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-01-07 21:44:39 -0800
committerKeith Packard <keithp@keithp.com>2018-01-07 21:44:39 -0800
commit48d164e3d4b2ef27fae20fae63b8014803a7b178 (patch)
treec0dc65ded8300299b862870f5eabf83d9a36455f /src/stmf0/ao_adc_fast.c
parentdb7f7c6c7f956058250b8057c6c27284f6f22e53 (diff)
altos/stmf0: Use double buffering for ChaosKey
This improves the USB performance of ChaosKey so that it doesn't NAK during data transfers at all. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stmf0/ao_adc_fast.c')
-rw-r--r--src/stmf0/ao_adc_fast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stmf0/ao_adc_fast.c b/src/stmf0/ao_adc_fast.c
index 5ce3a396..fbf4ad2e 100644
--- a/src/stmf0/ao_adc_fast.c
+++ b/src/stmf0/ao_adc_fast.c
@@ -154,7 +154,7 @@ ao_adc_init(void)
#endif
/* Set the clock */
- stm_adc.cfgr2 = STM_ADC_CFGR2_CKMODE_ADCCLK << STM_ADC_CFGR2_CKMODE;
+ stm_adc.cfgr2 = STM_ADC_CFGR2_CKMODE_PCLK_2 << STM_ADC_CFGR2_CKMODE;
/* Shortest sample time */
stm_adc.smpr = STM_ADC_SMPR_SMP_1_5 << STM_ADC_SMPR_SMP;