Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type pipe_handle_t not found in HID class #449

Closed
cyberchrime opened this issue Jun 29, 2020 · 6 comments · Fixed by #505
Closed

Type pipe_handle_t not found in HID class #449

cyberchrime opened this issue Jun 29, 2020 · 6 comments · Fixed by #505
Labels

Comments

@cyberchrime
Copy link

cyberchrime commented Jun 29, 2020

Set up

  • PC OS : Ubuntu 18.04.4 LTS
  • Board : Xilinx Zybo
  • Firmware: examples/host/cdc_msc_hid/

Describe the bug
Hey there, we are currently working on porting TinyUSB to the APU of the Xilinx Zybo to use a USB keyboard on it. The host driver seems to work okay so far. However, we are struggling with the HID class driver. When compiling the example code, there appears the following error:

In file included from /tinyusb/src/tusb.h:46:0,
from /tinyusb/hw/bsp/zybo/../board.h:42,
from /tinyusb/hw/bsp/zybo/zynq7000.c:29:
/tinyusb/src/class/hid/hid_host.h:199:3: error: unknown type name 'pipe_handle_t'
pipe_handle_t pipe_hdl;

Seems like the type pipe_handle_t was never defined, since we could not find it anywhere. Do you have any hints about the intention of this type?

To reproduce
To reproduce the behaviour, it should be sufficient to use any board with host capability and compile the firmware examples/host/cdc_msc_hid/ with the parameter CFG_TUH_HID_KEYBOARD set to 1 in the tusb_config.

We'd really appreciate your help in fixing this issue. We're really looking forward to hearing from you!

@hathach
Copy link
Owner

hathach commented Jun 30, 2020

Yeah, it is unfortunately a legacy/obsolete code from host stack. In short pipe_handle_t is removed, and I already migrated the cdc and msc host driver away from that, but not HID. I was caught busy with other works and haven't got time to update the HID driver since then.

When I could manage my time, I will try to resume the work with host stack later on. Thanks for reporting the issue.

@Klimm-Max
Copy link

Hi there,
i am facing the same issue with HID host driver.
it would be awesome to use the supported HID functionality. 👍

@hathach
Copy link
Owner

hathach commented Jul 1, 2020

I will try to look at the host stack asap to clean this up. Will let you know when it is ready, keep watching.

@cyberchrime
Copy link
Author

cyberchrime commented Jul 3, 2020

@hathach just started porting the HID class to the restructured host stack and compilation now passes successfully. Initialization seems to work, but there is no USB interrupt when pressing a key on a keyboard. Do you have any idea how to fix this? You may have a look on my code on the branch "zybo" in the forked repository at my account here on GitHub.

I'd really appreciate if you find some time to help me fixing this.

@cyberchrime
Copy link
Author

Just introduced FreeRTOS into the project, since the Zynq-7000 platform is having problems when used in NO-OS mode. Now the keyboard is detected successfully all the tile, though some minor errors appear. Only the Interrupt mode seems to be not working yet. Looks like everything is registered fine, but no interrupts occur.

@hathach
Copy link
Owner

hathach commented Jul 8, 2020

@Mister-Mojo I would love to help, but I have no idea with the issue you are mentioning. If you could submit a PR for zynq7000 I could try it out to see what is wrong with the stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants