summaryrefslogtreecommitdiff
path: root/src/stmf0/stm32f0.h
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/stm32f0.h
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/stm32f0.h')
-rw-r--r--src/stmf0/stm32f0.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stmf0/stm32f0.h b/src/stmf0/stm32f0.h
index 277fa223..968c1295 100644
--- a/src/stmf0/stm32f0.h
+++ b/src/stmf0/stm32f0.h
@@ -2000,7 +2000,12 @@ union stm_usb_bdt {
#define STM_USB_BDT_SIZE 8
+/* We'll use the first block of usb SRAM for the BDT */
extern uint8_t stm_usb_sram[] __attribute__((aligned(4)));
+extern union stm_usb_bdt stm_usb_bdt[STM_USB_BDT_SIZE] __attribute__((aligned(4)));
+
+#define stm_usb_sram ((uint8_t *) 0x40006000)
+#define stm_usb_bdt ((union stm_usb_bdt *) 0x40006000)
struct stm_exti {
vuint32_t imr;