aboutsummaryrefslogtreecommitdiff
path: root/cores
diff options
context:
space:
mode:
authorMartino Facchin <m.facchin@arduino.cc>2015-06-05 17:49:06 +0200
committerCristian Maglie <c.maglie@arduino.cc>2015-07-16 13:12:14 +0200
commit8518b4a5456fe6eee24c31ffe152cddabc1feb6e (patch)
tree62e53193abf50c7dc58b8a0999d5451e3b8f58ed /cores
parentf71f63a644ef79a7125ac23314f9a008ab4a9b76 (diff)
move _initEndpoints from PROGMEM to RAM
Diffstat (limited to 'cores')
-rw-r--r--cores/arduino/USBCore.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp
index bac169a..a866d95 100644
--- a/cores/arduino/USBCore.cpp
+++ b/cores/arduino/USBCore.cpp
@@ -313,8 +313,7 @@ int USB_Send(u8 ep, const void* d, int len)
return r;
}
-extern const u8 _initEndpoints[] PROGMEM;
-const u8 _initEndpoints[] =
+u8 _initEndpoints[] =
{
0,
@@ -344,11 +343,11 @@ void InitEP(u8 index, u8 type, u8 size)
static
void InitEndpoints()
{
- for (u8 i = 1; i < sizeof(_initEndpoints); i++)
+ for (u8 i = 1; i < sizeof(_initEndpoints) && _initEndpoints[i] != 0; i++)
{
UENUM = i;
UECONX = 1;
- UECFG0X = pgm_read_byte(_initEndpoints+i);
+ UECFG0X = _initEndpoints[i];
UECFG1X = EP_DOUBLE_64;
}
UERST = 0x7E; // And reset them