mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Fixed bmNakPower issue
This commit is contained in:
parent
1f35732109
commit
ad9f59173b
2 changed files with 8 additions and 9 deletions
15
PS3BT.cpp
15
PS3BT.cpp
|
@ -41,10 +41,9 @@ PS3BT::PS3BT(USB *p):
|
|||
{
|
||||
epInfo[i].epAddr = 0;
|
||||
epInfo[i].maxPktSize = (i) ? 0 : 8;
|
||||
epInfo[i].epAttribs = 0;
|
||||
|
||||
if (!i)
|
||||
epInfo[i].bmNakPower = USB_NAK_DEFAULT;//USB_NAK_MAX_POWER
|
||||
epInfo[i].epAttribs = 0;
|
||||
if (!i)
|
||||
epInfo[i].bmNakPower = USB_NAK_DEFAULT;
|
||||
}
|
||||
|
||||
if (pUsb) // register in USB subsystem
|
||||
|
@ -190,17 +189,19 @@ uint8_t PS3BT::Init(uint8_t parent, uint8_t port, bool lowspeed)
|
|||
/* Initialize data structures for endpoints of device */
|
||||
epInfo[ CSR_EVENT_PIPE ].epAddr = 0x01; // Bluetooth event endpoint
|
||||
epInfo[ CSR_EVENT_PIPE ].epAttribs = EP_INTERRUPT;
|
||||
epInfo[ CSR_EVENT_PIPE ].bmNakPower = USB_NAK_NOWAIT;//Only poll once for interrupt endpoints
|
||||
epInfo[ CSR_EVENT_PIPE ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints
|
||||
epInfo[ CSR_EVENT_PIPE ].maxPktSize = INT_MAXPKTSIZE;
|
||||
epInfo[ CSR_EVENT_PIPE ].bmSndToggle = bmSNDTOG0;
|
||||
epInfo[ CSR_EVENT_PIPE ].bmRcvToggle = bmRCVTOG0;
|
||||
epInfo[ CSR_DATAIN_PIPE ].epAddr = 0x02; // Bluetoth data endpoint
|
||||
epInfo[ CSR_DATAIN_PIPE ].epAttribs = EP_BULK;
|
||||
epInfo[ CSR_DATAIN_PIPE ].bmNakPower = USB_NAK_NOWAIT;
|
||||
epInfo[ CSR_DATAIN_PIPE ].maxPktSize = BULK_MAXPKTSIZE;
|
||||
epInfo[ CSR_DATAIN_PIPE ].bmSndToggle = bmSNDTOG0;
|
||||
epInfo[ CSR_DATAIN_PIPE ].bmRcvToggle = bmRCVTOG0;
|
||||
epInfo[ CSR_DATAOUT_PIPE ].epAddr = 0x02; // Bluetooth data endpoint
|
||||
epInfo[ CSR_DATAOUT_PIPE ].epAttribs = EP_BULK;
|
||||
epInfo[ CSR_DATAOUT_PIPE ].bmNakPower = USB_NAK_NOWAIT;
|
||||
epInfo[ CSR_DATAOUT_PIPE ].maxPktSize = BULK_MAXPKTSIZE;
|
||||
epInfo[ CSR_DATAOUT_PIPE ].bmSndToggle = bmSNDTOG0;
|
||||
epInfo[ CSR_DATAOUT_PIPE ].bmRcvToggle = bmRCVTOG0;
|
||||
|
@ -230,13 +231,13 @@ uint8_t PS3BT::Init(uint8_t parent, uint8_t port, bool lowspeed)
|
|||
/* Initialize data structures for endpoints of device */
|
||||
epInfo[ PS3_OUTPUT_PIPE ].epAddr = 0x02; // PS3 output endpoint
|
||||
epInfo[ PS3_OUTPUT_PIPE ].epAttribs = EP_INTERRUPT;
|
||||
epInfo[ PS3_OUTPUT_PIPE ].bmNakPower = USB_NAK_NOWAIT;//Only poll once for interrupt endpoints
|
||||
epInfo[ PS3_OUTPUT_PIPE ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints
|
||||
epInfo[ PS3_OUTPUT_PIPE ].maxPktSize = EP_MAXPKTSIZE;
|
||||
epInfo[ PS3_OUTPUT_PIPE ].bmSndToggle = bmSNDTOG0;
|
||||
epInfo[ PS3_OUTPUT_PIPE ].bmRcvToggle = bmRCVTOG0;
|
||||
epInfo[ PS3_INPUT_PIPE ].epAddr = 0x01; // PS3 report endpoint
|
||||
epInfo[ PS3_INPUT_PIPE ].epAttribs = EP_INTERRUPT;
|
||||
epInfo[ PS3_INPUT_PIPE ].bmNakPower = USB_NAK_NOWAIT;//Only poll once for interrupt endpoints
|
||||
epInfo[ PS3_INPUT_PIPE ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints
|
||||
epInfo[ PS3_INPUT_PIPE ].maxPktSize = EP_MAXPKTSIZE;
|
||||
epInfo[ PS3_INPUT_PIPE ].bmSndToggle = bmSNDTOG0;
|
||||
epInfo[ PS3_INPUT_PIPE ].bmRcvToggle = bmRCVTOG0;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
The PS3BT.cpp PS3BT.h was developed by Kristian Lauszus
|
||||
|
||||
If it doesn't work then try comment "nak_limit--;" in "SetAddress()" in "Usb.cpp", as this caused some problems.
|
||||
|
||||
For more information regarding the PS3 protocol etc. visit my blog at: http://blog.tkjelectronics.dk/ or send me an email at kristianl at tkjelectronics dot dk.
|
||||
You could also visit the official wiki: https://github.com/TKJElectronics/USB_Host_Shield_2.0/wiki for information.
|
||||
|
||||
|
|
Loading…
Reference in a new issue