move _initEndpoints from PROGMEM to RAM

This commit is contained in:
Martino Facchin 2015-06-05 17:49:06 +02:00 committed by Cristian Maglie
parent f71f63a644
commit 8518b4a545
1 changed files with 3 additions and 4 deletions

View File

@ -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