forked from mfulz_github/qmk_firmware
Fixed possible register corruption in USB Host mode on AVR8 devices when ORDERED_EP_CONFIG is used (thanks to Martin Aakerberg).
This commit is contained in:
parent
2fe1d7d170
commit
8232721102
|
@ -21,6 +21,7 @@
|
||||||
* <b>Fixed:</b>
|
* <b>Fixed:</b>
|
||||||
* - Core:
|
* - Core:
|
||||||
* - Fixed Low Speed USB devices broken when using the library HID Class driver (thanks to Michael)
|
* - Fixed Low Speed USB devices broken when using the library HID Class driver (thanks to Michael)
|
||||||
|
* - Fixed possible register corruption in USB Host mode on AVR8 devices when ORDERED_EP_CONFIG is used (thanks to Martin Aakerberg)
|
||||||
* - Library Applications:
|
* - Library Applications:
|
||||||
* - Added handler for SCSI_CMD_START_STOP_UNIT in demos using the Mass Storage class, to prevent ejection errors on *nix systems due to an
|
* - Added handler for SCSI_CMD_START_STOP_UNIT in demos using the Mass Storage class, to prevent ejection errors on *nix systems due to an
|
||||||
* unknown SCSI command
|
* unknown SCSI command
|
||||||
|
|
|
@ -47,13 +47,13 @@ bool Pipe_ConfigurePipeTable(const USB_Pipe_Table_t* const Table,
|
||||||
{
|
{
|
||||||
if (!(Table[i].Address))
|
if (!(Table[i].Address))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!(Pipe_ConfigurePipe(Table[i].Address, Table[i].Type, Table[i].EndpointAddress, Table[i].Size, Table[i].Banks)))
|
if (!(Pipe_ConfigurePipe(Table[i].Address, Table[i].Type, Table[i].EndpointAddress, Table[i].Size, Table[i].Banks)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ bool Pipe_ConfigurePipe(const uint8_t Address,
|
||||||
{
|
{
|
||||||
uint8_t Number = (Address & PIPE_EPNUM_MASK);
|
uint8_t Number = (Address & PIPE_EPNUM_MASK);
|
||||||
uint8_t Token = (Address & PIPE_DIR_IN) ? PIPE_TOKEN_IN : PIPE_TOKEN_OUT;
|
uint8_t Token = (Address & PIPE_DIR_IN) ? PIPE_TOKEN_IN : PIPE_TOKEN_OUT;
|
||||||
|
|
||||||
if (Number >= PIPE_TOTAL_PIPES)
|
if (Number >= PIPE_TOTAL_PIPES)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ bool Pipe_ConfigurePipe(const uint8_t Address,
|
||||||
if (PNum == Number)
|
if (PNum == Number)
|
||||||
{
|
{
|
||||||
UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointAddress & PIPE_EPNUM_MASK) << PEPNUM0));
|
UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointAddress & PIPE_EPNUM_MASK) << PEPNUM0));
|
||||||
UPCFG1XTemp = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size));
|
UPCFG1XTemp = ((1 << ALLOC) | ((Banks > 1) ? (1 << EPBK0) : 0) | Pipe_BytesToEPSizeMask(Size));
|
||||||
UPCFG2XTemp = 0;
|
UPCFG2XTemp = 0;
|
||||||
UPIENXTemp = 0;
|
UPIENXTemp = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue