Bladeren bron

T3/T4.x MTP device descriptor - update endpoint and size

For T4.x to allow MTP USB type device to generate events to send to the host, the Endpoint configuration need to change to say that we are transmitting on interrupt, not receiving.

Plus I updated the end point event size to 32 as some events might be > 16.  16 is only large enought so send one parameter.  I noticed Kindle Fire has it set to something like 28...

I have done similar changes for T3.x but have not tested it yet.
main
Kurt Eckhardt 3 jaren geleden
bovenliggende
commit
c63e467bad
2 gewijzigde bestanden met toevoegingen van 4 en 6 verwijderingen
  1. +2
    -3
      teensy3/usb_desc.h
  2. +2
    -3
      teensy4/usb_desc.h

+ 2
- 3
teensy3/usb_desc.h Bestand weergeven

@@ -722,7 +722,7 @@ let me know? http://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports
#define MTP_RX_ENDPOINT 3
#define MTP_RX_SIZE 64
#define MTP_EVENT_ENDPOINT 4
#define MTP_EVENT_SIZE 16
#define MTP_EVENT_SIZE 32
#define MTP_EVENT_INTERVAL 10
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 1
@@ -734,8 +734,7 @@ let me know? http://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports
#define ENDPOINT1_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
// TODO: Should ENDPOINT4_CONFIG be ENDPOINT_TRANSMIT_ONLY ???
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT4_CONFIG ENDPOINT_TRANSMIT_ONLY

#elif defined(USB_AUDIO)
#define VENDOR_ID 0x16C0

+ 2
- 3
teensy4/usb_desc.h Bestand weergeven

@@ -692,7 +692,7 @@ let me know? http://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports
#define MTP_RX_SIZE_12 64
#define MTP_RX_SIZE_480 512
#define MTP_EVENT_ENDPOINT 4
#define MTP_EVENT_SIZE 16
#define MTP_EVENT_SIZE 32
#define MTP_EVENT_INTERVAL_12 10 // 10 = 10 ms
#define MTP_EVENT_INTERVAL_480 7 // 7 = 8 ms
#define SEREMU_INTERFACE 1 // Serial emulation
@@ -704,8 +704,7 @@ let me know? http://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports
#define SEREMU_RX_INTERVAL 2
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
// TODO: Should ENDPOINT4_CONFIG be ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT ???
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_UNUSED
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT

#elif defined(USB_AUDIO)
#define VENDOR_ID 0x16C0

Laden…
Annuleren
Opslaan