Add __VA_ARGS__ support to the LUFA supplied ISR macro. Add proper result typecasting to the SWAPENDIAN_* macros.
Switch to using -1 on the UC3 target to obtain a register mask with all bits set (for clearing interrupts and status flags). Fix incorrect USB controller mode on the UC3 when a fixed mode is specified as a compile time option due to AVR32_USBB.USBCON.uide being set by default. Make USB_Descriptor_String_t use a uint16_t for Unicode strings on all targets except the AVR8 (retained for backwards compatibility).
This commit is contained in:
parent
7b0cebc1d7
commit
f670bdeff8
8 changed files with 28 additions and 24 deletions
|
|
@ -61,7 +61,7 @@ void Endpoint_ClearEndpoints(void)
|
|||
{
|
||||
Endpoint_SelectEndpoint(EPNum);
|
||||
(&AVR32_USBB.uecfg0)[EPNum] = 0;
|
||||
(&AVR32_USBB.uecon0clr)[EPNum] = 0xFFFFFFFF;
|
||||
(&AVR32_USBB.uecon0clr)[EPNum] = -1;
|
||||
USB_EndpointFIFOPos[EPNum] = &AVR32_USBB_SLAVE[EPNum * 0x10000];
|
||||
Endpoint_DisableEndpoint();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ void Pipe_ClearPipes(void)
|
|||
{
|
||||
Pipe_SelectPipe(PNum);
|
||||
(&AVR32_USBB.upcfg0)[PNum] = 0;
|
||||
(&AVR32_USBB.upcon0clr)[PNum] = 0xFFFFFFFF;
|
||||
(&AVR32_USBB.upcon0clr)[PNum] = -1;
|
||||
USB_PipeFIFOPos[PNum] = &AVR32_USBB_SLAVE[PNum * 0x10000];
|
||||
Pipe_DisablePipe();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@ void USB_Init(
|
|||
AVR32_USBB.USBCON.uide = false;
|
||||
USB_CurrentMode = Mode;
|
||||
}
|
||||
#else
|
||||
AVR32_USBB.USBCON.uide = false;
|
||||
#endif
|
||||
|
||||
USB_IsInitialized = true;
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ void USB_INT_DisableAllInterrupts(void)
|
|||
AVR32_USBB.USBCON.vbuste = false;
|
||||
AVR32_USBB.USBCON.idte = false;
|
||||
|
||||
AVR32_USBB.uhinteclr = 0xFFFFFFFF;
|
||||
AVR32_USBB.udinteclr = 0xFFFFFFFF;
|
||||
AVR32_USBB.uhinteclr = -1;
|
||||
AVR32_USBB.udinteclr = -1;
|
||||
}
|
||||
|
||||
void USB_INT_ClearAllInterrupts(void)
|
||||
|
|
@ -45,8 +45,8 @@ void USB_INT_ClearAllInterrupts(void)
|
|||
AVR32_USBB.USBSTACLR.vbustic = true;
|
||||
AVR32_USBB.USBSTACLR.idtic = true;
|
||||
|
||||
AVR32_USBB.uhintclr = 0xFFFFFFFF;
|
||||
AVR32_USBB.udintclr = 0xFFFFFFFF;
|
||||
AVR32_USBB.uhintclr = -1;
|
||||
AVR32_USBB.udintclr = -1;
|
||||
}
|
||||
|
||||
ISR(USB_GEN_vect)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue