Teensy 4.0 no support for keyboard_leds

Status
Not open for further replies.
It took me a few minutes to figure out what you are asking...

Looks like @Paul has not put in the support yet...

If you are setup to test this out, you might try adding the following lines to cores\teensy4\usb.c at about line 623
Code:
#ifdef KEYBOARD_INTERFACE
	if (setup.word1 == 0x02000921 && setup.word2 == ((1<<16)|KEYBOARD_INTERFACE)) {
		keyboard_leds = endpoint0_buffer[0];
		usb_start_sof_interrupts(NUM_INTERFACE);
		usb_reboot_timer = 80; // TODO: 10 if only 12 Mbit/sec
	}
#endif
Note: I extracted this from cores/teen3/usb_dev.c and changed it slightly to match the other ones near it, like the SEREMU_INTERFACE...

If this works, one of us can put this into a Pull Request against the cores github project.
 
It took me a few minutes to figure out what you are asking...

If this works, one of us can put this into a Pull Request against the cores github project.
Thanks for answer, KurtE
Sorry, but your code produced bootloop...
 
It works with the following code:
Code:
#ifdef KEYBOARD_INTERFACE
	if (setup.word1 == 0x02000921 && setup.word2 == ((1 << 16) | KEYBOARD_INTERFACE)) {
		keyboard_leds = endpoint0_buffer[0];
		endpoint0_transmit(NULL, 0, 0);
	}
#endif
 
Sounds good... Yep - looks like setting the reboot timer was not the correct thing :D
 
Status
Not open for further replies.
Back
Top