I created a custom usb desc item as follows:
but when i start using the mouse and the rawhid at the same time the program freezes until i disconnect from the rawhid. Did i do anything wrong in the usb_desc that could have caused this? Could it be a hardware limitation? Or is it definitely a problem in my code.
Code:
#elif defined(USB_RAWHID_HID)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0486
#define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
#define RAWHID_USAGE 0x0200 // recommended: 0x0100 to 0xFFFF
#define MANUFACTURER_NAME {'D','o','n','g','l','o','v','e','r'}
#define MANUFACTURER_NAME_LEN 9
#define PRODUCT_NAME {'I','n','d','u','s','t','r','i','e','s'}
#define PRODUCT_NAME_LEN 10
#define EP0_SIZE 64
#define NUM_ENDPOINTS 6
#define NUM_USB_BUFFERS 20
#define NUM_INTERFACE 3
#define RAWHID_INTERFACE 0 // RawHID
#define RAWHID_TX_ENDPOINT 3
#define RAWHID_TX_SIZE 64
#define RAWHID_TX_INTERVAL 1
#define RAWHID_RX_ENDPOINT 4
#define RAWHID_RX_SIZE 64
#define RAWHID_RX_INTERVAL 1
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 1
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define MOUSE_INTERFACE 2 // Mouse
#define MOUSE_ENDPOINT 5
#define MOUSE_SIZE 8
#define MOUSE_INTERVAL 2
#define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
Code:
teensy36.menu.usb.rawhid=Raw HID
teensy36.menu.usb.rawhid.build.usbtype=USB_RAWHID
teensy36.menu.usb.rawhid.fake_serial=teensy_gateway
teensy36.menu.usb.rawhid=Raw HID + MOUSE
teensy36.menu.usb.rawhid.build.usbtype=USB_RAWHID_HID
teensy36.menu.usb.rawhid.fake_serial=teensy_gateway
but when i start using the mouse and the rawhid at the same time the program freezes until i disconnect from the rawhid. Did i do anything wrong in the usb_desc that could have caused this? Could it be a hardware limitation? Or is it definitely a problem in my code.
Last edited: