summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/tcc77x.h3
-rw-r--r--firmware/export/tcc780x.h3
-rw-r--r--firmware/system.c1
-rw-r--r--firmware/target/arm/usb-tcc.c6
4 files changed, 12 insertions, 1 deletions
diff --git a/firmware/export/tcc77x.h b/firmware/export/tcc77x.h
index 9ff8adea3e..5346e585aa 100644
--- a/firmware/export/tcc77x.h
+++ b/firmware/export/tcc77x.h
@@ -258,4 +258,7 @@
258/* USB 2.0 device system MMR base address */ 258/* USB 2.0 device system MMR base address */
259#define USB_BASE 0x90000b00 259#define USB_BASE 0x90000b00
260 260
261#define USB_NUM_ENDPOINTS 3
262#define USB_DEVBSS_ATTR IBSS_ATTR
263
261#endif 264#endif
diff --git a/firmware/export/tcc780x.h b/firmware/export/tcc780x.h
index 1e2052c4be..b10b311fed 100644
--- a/firmware/export/tcc780x.h
+++ b/firmware/export/tcc780x.h
@@ -229,4 +229,7 @@
229/* USB 2.0 device system MMR base address */ 229/* USB 2.0 device system MMR base address */
230#define USB_BASE 0xf0010000 230#define USB_BASE 0xf0010000
231 231
232#define USB_NUM_ENDPOINTS 3
233#define USB_DEVBSS_ATTR IBSS_ATTR
234
232#endif 235#endif
diff --git a/firmware/system.c b/firmware/system.c
index 52be7a1a71..290452b0af 100644
--- a/firmware/system.c
+++ b/firmware/system.c
@@ -24,6 +24,7 @@
24#include "kernel.h" 24#include "kernel.h"
25#include "thread.h" 25#include "thread.h"
26#include "string.h" 26#include "string.h"
27#include "file.h"
27 28
28#ifndef SIMULATOR 29#ifndef SIMULATOR
29long cpu_frequency SHAREDBSS_ATTR = CPU_FREQ; 30long cpu_frequency SHAREDBSS_ATTR = CPU_FREQ;
diff --git a/firmware/target/arm/usb-tcc.c b/firmware/target/arm/usb-tcc.c
index aa4c2e4226..6f15e68af8 100644
--- a/firmware/target/arm/usb-tcc.c
+++ b/firmware/target/arm/usb-tcc.c
@@ -122,7 +122,7 @@ void usb_drv_release_endpoint(int ep)
122 int flags; 122 int flags;
123 ep = ep & 0x7f; 123 ep = ep & 0x7f;
124 124
125 if (ep < 1 || ep > NUM_ENDPOINTS) 125 if (ep < 1 || ep > USB_NUM_ENDPOINTS)
126 return ; 126 return ;
127 127
128 flags = disable_irq_save(); 128 flags = disable_irq_save();
@@ -744,6 +744,10 @@ void usb_enable(bool on)
744 usb_core_exit(); 744 usb_core_exit();
745} 745}
746 746
747void usb_attach(void)
748{
749 usb_enable(true);
750}
747 751
748int usb_detect(void) 752int usb_detect(void)
749{ 753{