diff --git a/_x_b_o_x_o_n_e_8cpp_source.html b/_x_b_o_x_o_n_e_8cpp_source.html
index 123a47ec..d7b260ed 100644
--- a/_x_b_o_x_o_n_e_8cpp_source.html
+++ b/_x_b_o_x_o_n_e_8cpp_source.html
@@ -323,252 +323,260 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 254 if(pollInterval < pep->bInterval)
-
-
-
-
-
-
- 261 Notify(
PSTR(
"\r\nEndpoint descriptor:"), 0x80);
-
- 263 D_PrintHex<uint8_t > (ep_ptr->
bLength, 0x80);
-
-
-
-
-
-
-
-
-
- 273 D_PrintHex<uint8_t > (ep_ptr->
bInterval, 0x80);
-
-
-
-
-
-
-
-
-
-
-
-
- 286 #ifdef DEBUG_USB_HOST
- 287 Notify(
PSTR(
"\r\nXbox One Controller Disconnected\r\n"), 0x80);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 304 #ifdef PRINTREPORT // Uncomment "#define PRINTREPORT" to print the report send by the Xbox ONE Controller
- 305 for(uint8_t i = 0; i < length; i++) {
- 306 D_PrintHex<uint8_t > (readBuf[i], 0x80);
-
-
-
-
-
- 312 #ifdef DEBUG_USB_HOST
- 313 else if(rcode !=
hrNAK) {
- 314 Notify(
PSTR(
"\r\nXbox One Poll Failed, error code: "), 0x80);
-
-
-
-
-
-
-
- 322 void XBOXONE::readReport() {
- 323 if(readBuf[0] == 0x07) {
-
-
-
-
-
+
+ 240 uint8_t iface __attribute__((unused)),
+ 241 uint8_t alt __attribute__((unused)),
+ 242 uint8_t proto __attribute__((unused)),
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 260 if(pollInterval < pep->bInterval)
+
+
+
+
+
+ 266 __attribute__((unused)))
+
+
+ 269 Notify(
PSTR(
"\r\nEndpoint descriptor:"), 0x80);
+
+ 271 D_PrintHex<uint8_t > (ep_ptr->bLength, 0x80);
+
+ 273 D_PrintHex<uint8_t > (ep_ptr->bDescriptorType, 0x80);
+
+ 275 D_PrintHex<uint8_t > (ep_ptr->bEndpointAddress, 0x80);
+
+ 277 D_PrintHex<uint8_t > (ep_ptr->bmAttributes, 0x80);
+
+ 279 D_PrintHex<uint16_t > (ep_ptr->wMaxPacketSize, 0x80);
+
+ 281 D_PrintHex<uint8_t > (ep_ptr->bInterval, 0x80);
+
+
+
+
+
+
+
+
+
+
+
+
+ 294 #ifdef DEBUG_USB_HOST
+ 295 Notify(
PSTR(
"\r\nXbox One Controller Disconnected\r\n"), 0x80);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 312 #ifdef PRINTREPORT // Uncomment "#define PRINTREPORT" to print the report send by the Xbox ONE Controller
+ 313 for(uint8_t i = 0; i < length; i++) {
+ 314 D_PrintHex<uint8_t > (readBuf[i], 0x80);
+
+
+
+
+
+ 320 #ifdef DEBUG_USB_HOST
+ 321 else if(rcode !=
hrNAK) {
+ 322 Notify(
PSTR(
"\r\nXbox One Poll Failed, error code: "), 0x80);
+
+
+
+
+
+
- 330 if(ButtonState != OldButtonState) {
- 331 ButtonClickState = ButtonState & ~OldButtonState;
- 332 OldButtonState = ButtonState;
-
-
- 335 if(readBuf[0] != 0x20) {
-
-
- 338 D_PrintHex<uint8_t > (readBuf[0], 0x80);
-
-
-
-
-
-
- 345 ButtonState = xbox | (((uint16_t)readBuf[5] & 0xF) << 8) | (readBuf[4] & 0xF0) | (((uint16_t)readBuf[4] & 0x0C) << 10) | ((readBuf[4] & 0x01) << 3) | (((uint16_t)readBuf[5] & 0xC0) << 8) | ((readBuf[5] & 0x30) >> 4);
-
- 347 triggerValue[0] = (uint16_t)(((uint16_t)readBuf[7] << 8) | readBuf[6]);
- 348 triggerValue[1] = (uint16_t)(((uint16_t)readBuf[9] << 8) | readBuf[8]);
-
- 350 hatValue[
LeftHatX] = (int16_t)(((uint16_t)readBuf[11] << 8) | readBuf[10]);
- 351 hatValue[
LeftHatY] = (int16_t)(((uint16_t)readBuf[13] << 8) | readBuf[12]);
- 352 hatValue[
RightHatX] = (int16_t)(((uint16_t)readBuf[15] << 8) | readBuf[14]);
- 353 hatValue[
RightHatY] = (int16_t)(((uint16_t)readBuf[17] << 8) | readBuf[16]);
+ 330 void XBOXONE::readReport() {
+ 331 if(readBuf[0] == 0x07) {
+
+
+
+
+
+
+ 338 if(ButtonState != OldButtonState) {
+ 339 ButtonClickState = ButtonState & ~OldButtonState;
+ 340 OldButtonState = ButtonState;
+
+
+ 343 if(readBuf[0] != 0x20) {
+
+
+ 346 D_PrintHex<uint8_t > (readBuf[0], 0x80);
+
+
+
+
+
+
+ 353 ButtonState = xbox | (((uint16_t)readBuf[5] & 0xF) << 8) | (readBuf[4] & 0xF0) | (((uint16_t)readBuf[4] & 0x0C) << 10) | ((readBuf[4] & 0x01) << 3) | (((uint16_t)readBuf[5] & 0xC0) << 8) | ((readBuf[5] & 0x30) >> 4);
-
-
+ 355 triggerValue[0] = (uint16_t)(((uint16_t)readBuf[7] << 8) | readBuf[6]);
+ 356 triggerValue[1] = (uint16_t)(((uint16_t)readBuf[9] << 8) | readBuf[8]);
- 358 if(ButtonState != OldButtonState) {
- 359 ButtonClickState = ButtonState & ~OldButtonState;
- 360 OldButtonState = ButtonState;
-
+ 358 hatValue[
LeftHatX] = (int16_t)(((uint16_t)readBuf[11] << 8) | readBuf[10]);
+ 359 hatValue[
LeftHatY] = (int16_t)(((uint16_t)readBuf[13] << 8) | readBuf[12]);
+ 360 hatValue[
RightHatX] = (int16_t)(((uint16_t)readBuf[15] << 8) | readBuf[14]);
+ 361 hatValue[
RightHatY] = (int16_t)(((uint16_t)readBuf[17] << 8) | readBuf[16]);
-
- 364 if(triggerValue[0] != 0 && triggerValueOld[0] == 0)
-
- 366 triggerValueOld[0] = triggerValue[0];
- 367 if(triggerValue[1] != 0 && triggerValueOld[1] == 0)
-
- 369 triggerValueOld[1] = triggerValue[1];
-
-
-
-
- 374 return triggerValue[0];
-
- 376 return triggerValue[1];
-
+
+
+
+ 366 if(ButtonState != OldButtonState) {
+ 367 ButtonClickState = ButtonState & ~OldButtonState;
+ 368 OldButtonState = ButtonState;
+
+
+
+ 372 if(triggerValue[0] != 0 && triggerValueOld[0] == 0)
+
+ 374 triggerValueOld[0] = triggerValue[0];
+ 375 if(triggerValue[1] != 0 && triggerValueOld[1] == 0)
+
+ 377 triggerValueOld[1] = triggerValue[1];
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 395 bool click = (ButtonClickState & button);
- 396 ButtonClickState &= ~button;
-
-
-
-
-
-
-
-
- 405 uint8_t XBOXONE::XboxCommand(uint8_t* data, uint16_t nbytes) {
- 406 data[2] = cmdCounter++;
-
- 408 #ifdef DEBUG_USB_HOST
- 409 Notify(
PSTR(
"\r\nXboxCommand, Return: "), 0x80);
- 410 D_PrintHex<uint8_t > (rcode, 0x80);
-
-
-
-
-
- 416 void XBOXONE::onInit() {
-
- 418 uint8_t writeBuf[13];
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 436 XboxCommand(writeBuf, 13);
-
-
-
-
-
-
- 443 uint8_t writeBuf[13];
-
-
-
-
-
+
+
+ 382 return triggerValue[0];
+
+ 384 return triggerValue[1];
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 403 bool click = (ButtonClickState & button);
+ 404 ButtonClickState &= ~button;
+
+
+
+
+
+
+
+
+ 413 uint8_t XBOXONE::XboxCommand(uint8_t* data, uint16_t nbytes) {
+ 414 data[2] = cmdCounter++;
+
+ 416 #ifdef DEBUG_USB_HOST
+ 417 Notify(
PSTR(
"\r\nXboxCommand, Return: "), 0x80);
+ 418 D_PrintHex<uint8_t > (rcode, 0x80);
+
+
+
+
+
+ 424 void XBOXONE::onInit() {
+
+ 426 uint8_t writeBuf[13];
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 444 XboxCommand(writeBuf, 13);
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
- 461 XboxCommand(writeBuf, 13);
-
-
-
- 465 uint8_t writeBuf[13];
-
-
-
-
-
+
+ 451 uint8_t writeBuf[13];
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 469 XboxCommand(writeBuf, 13);
+
-
-
-
-
- 476 writeBuf[6] = leftTrigger;
- 477 writeBuf[7] = rightTrigger;
- 478 writeBuf[8] = leftMotor;
- 479 writeBuf[9] = rightMotor;
-
-
-
- 483 XboxCommand(writeBuf, 13);
-
+
+ 473 uint8_t writeBuf[13];
+
+
+
+
+
+
+
+
+
+
+ 484 writeBuf[6] = leftTrigger;
+ 485 writeBuf[7] = rightTrigger;
+ 486 writeBuf[8] = leftMotor;
+ 487 writeBuf[9] = rightMotor;
+
+
+
+ 491 XboxCommand(writeBuf, 13);
+
uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr)
@@ -582,7 +590,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#define pgm_read_word(addr)
-
@@ -602,14 +609,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
uint8_t setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr)
#define NotifyFailGetConfDescr(...)
-void PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR *ep_ptr)
+void PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR *ep_ptr)
#define XBOX_ONE_MAX_ENDPOINTS
#define NotifyFailUnknownDevice(...)
-
+
#define USB_NAK_MAX_POWER
-virtual uint8_t Release()
+virtual uint8_t Release()
uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data)
@@ -618,7 +625,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#define bmUSB_TRANSFER_TYPE
-uint16_t getButtonPress(ButtonEnum b)
+uint16_t getButtonPress(ButtonEnum b)
virtual uint8_t AllocAddress(uint8_t parent, bool is_hub=false, uint8_t port=0)=0
@@ -627,11 +634,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#define USB_ERROR_CLASS_INSTANCE_ALREADY_IN_USE
#define XBOX_ONE_INPUT_PIPE
-
EpInfo epInfo[XBOX_ONE_MAX_ENDPOINTS]
-bool getButtonClick(ButtonEnum b)
-
+bool getButtonClick(ButtonEnum b)
+
#define USB_ERROR_ADDRESS_NOT_FOUND_IN_POOL
#define USB_DEV_CONFIG_ERROR_DEVICE_NOT_SUPPORTED
@@ -644,7 +650,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#define XBOX_ONE_CONTROL_PIPE
#define XBOX_ONE_OUTPUT_PIPE
-int16_t getAnalogHat(AnalogHatEnum a)
+int16_t getAnalogHat(AnalogHatEnum a)
const uint16_t XBOX_BUTTONS[]
@@ -654,7 +660,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
virtual bool VIDPIDOK(uint16_t vid, uint16_t pid)
uint8_t getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr)
defined(USB_METHODS_INLINE)
#define NotifyFailSetDevTblEntry(...)
-void setRumbleOn(uint8_t leftTrigger, uint8_t rightTrigger, uint8_t leftMotor, uint8_t rightMotor)
+void setRumbleOn(uint8_t leftTrigger, uint8_t rightTrigger, uint8_t leftMotor, uint8_t rightMotor)
diff --git a/_x_b_o_x_o_n_e_8h_source.html b/_x_b_o_x_o_n_e_8h_source.html
index ce5c77a6..aa911bc2 100644
--- a/_x_b_o_x_o_n_e_8h_source.html
+++ b/_x_b_o_x_o_n_e_8h_source.html
@@ -247,25 +247,25 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep)
-void PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR *ep_ptr)
+void PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR *ep_ptr)
#define XBOX_ONE_MAX_ENDPOINTS
-
+
-virtual uint8_t Release()
+virtual uint8_t Release()
-uint16_t getButtonPress(ButtonEnum b)
+uint16_t getButtonPress(ButtonEnum b)
virtual uint8_t GetAddress()
EpInfo epInfo[XBOX_ONE_MAX_ENDPOINTS]
-bool getButtonClick(ButtonEnum b)
+bool getButtonClick(ButtonEnum b)
uint8_t readPollInterval()
-
+
virtual uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed)
@@ -275,13 +275,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
-int16_t getAnalogHat(AnalogHatEnum a)
+int16_t getAnalogHat(AnalogHatEnum a)
virtual bool VIDPIDOK(uint16_t vid, uint16_t pid)
-void setRumbleOn(uint8_t leftTrigger, uint8_t rightTrigger, uint8_t leftMotor, uint8_t rightMotor)
+void setRumbleOn(uint8_t leftTrigger, uint8_t rightTrigger, uint8_t leftMotor, uint8_t rightMotor)
- Returns
- getButtonClick(ButtonEnum b) will return a bool, while getButtonPress(ButtonEnum b) will return a word if reading L2 or R2.
-Definition at line 372 of file XBOXONE.cpp.
+Definition at line 380 of file XBOXONE.cpp.
@@ -505,7 +505,7 @@ Protected Attributes
- Returns
- getButtonClick(ButtonEnum b) will return a bool, while getButtonPress(ButtonEnum b) will return a word if reading L2 or R2.
-Definition at line 380 of file XBOXONE.cpp.
+Definition at line 388 of file XBOXONE.cpp.
@@ -531,7 +531,7 @@ Protected Attributes
- Returns
- Returns a signed 16-bit integer.
-Definition at line 400 of file XBOXONE.cpp.
+Definition at line 408 of file XBOXONE.cpp.
@@ -582,7 +582,7 @@ Protected Attributes
@@ -632,7 +632,7 @@ Protected Attributes
-Definition at line 464 of file XBOXONE.cpp.
+Definition at line 472 of file XBOXONE.cpp.
@@ -732,7 +732,7 @@ Protected Attributes
-Definition at line 259 of file XBOXONE.cpp.
+Definition at line 265 of file XBOXONE.cpp.