I had to rename the .ino file with .txt to make github happy.
What happened ?
I am porting over TinyUSB examples/dual/host_hid_to_device_cdc/ to Arduino but have run into multiple definitions of tuh_hid_mount_cb.
To fix I propose removing the tuhhid*_cb function declarations from Adafruit_TinyUSB_Arduino.h. The functions will eventually be defined in the sketch.
The next compile error is tuh_hid_report_received_cb is undefined which is not yet defined in the sketch.
To fix this, I propose adding TU_ATTR_WEAK to tuh_hid_mount_cb and tuh_hid_report_received_cb in hid_host.h.
How to reproduce ?
Rename hid_test.txt to hid_test.ino then compile with the IDE to see the compiler errors.
Looks like PR #190 is the same issue so feel free to close this.
Operating System
Linux
IDE version
Arduino 1.8.19
Board
Raspberry Pi Pico
ArduinoCore version
Raspberry Pi Pico/2040 by Philhower 2.3.3
TinyUSB Library version
github 2ab122c
Sketch (attached txt file)
hid_test.txt
I had to rename the .ino file with .txt to make github happy.
What happened ?
I am porting over TinyUSB examples/dual/host_hid_to_device_cdc/ to Arduino but have run into multiple definitions of tuh_hid_mount_cb.
To fix I propose removing the tuhhid*_cb function declarations from Adafruit_TinyUSB_Arduino.h. The functions will eventually be defined in the sketch.
The next compile error is tuh_hid_report_received_cb is undefined which is not yet defined in the sketch.
To fix this, I propose adding TU_ATTR_WEAK to tuh_hid_mount_cb and tuh_hid_report_received_cb in hid_host.h.
How to reproduce ?
Rename hid_test.txt to hid_test.ino then compile with the IDE to see the compiler errors.
Debug Log
No response
Screenshots
No response