Yes, I know there is a similar thread but it appears to go unnnoticed.
Here is my code:
As shown it creates a useable Teensy 4 serial+midi unit.
If I comment out the midi block and enable the keyboard and key media blocks (adjusting the number of interfaces to 3) I get a usable serial+keyboard unit.
If I enable ALL of the sections (adjusting the number of interfaces to 4) I get a usable serial+keyboard but the midi part gets a warning against it in device manager on Windows (10).
There's evidently some conflict here, but I cannot for the life of me see it.
Help!
Edit:
Immediately after upload all is well. It's actually when 'hot plugging' that the problem occurs
Here is my code:
Code:
#define EP0_SIZE 64
#define NUM_ENDPOINTS 7
#define NUM_USB_BUFFERS 16
#define NUM_INTERFACE 2
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 1
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1 // TODO: is this ok for 480 Mbit speed
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2 // TODO: is this ok for 480 Mbit speed
#define ENDPOINT1_CONFIG ENDPOINT_TRANSMIT_ONLY // serial tx
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY // serial rx
/*#define KEYBOARD_INTERFACE 2 // Keyboard
#define KEYBOARD_ENDPOINT 3
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1 // TODO: is this ok for 480 Mbit speed
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT //keyboard
#define KEYMEDIA_INTERFACE 3 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 4
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4 // TODO: is this ok for 480 Mbit speed
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT // keymedia
*/
#define MIDI_INTERFACE 4 // MIDI
#define MIDI_NUM_CABLES 1
#define MIDI_TX_ENDPOINT 5
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 6
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT6_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
As shown it creates a useable Teensy 4 serial+midi unit.
If I comment out the midi block and enable the keyboard and key media blocks (adjusting the number of interfaces to 3) I get a usable serial+keyboard unit.
If I enable ALL of the sections (adjusting the number of interfaces to 4) I get a usable serial+keyboard but the midi part gets a warning against it in device manager on Windows (10).
There's evidently some conflict here, but I cannot for the life of me see it.
Help!
Edit:
Immediately after upload all is well. It's actually when 'hot plugging' that the problem occurs