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

Set custom device serial number #85

Closed
okyeron opened this issue Sep 24, 2020 · 3 comments
Closed

Set custom device serial number #85

okyeron opened this issue Sep 24, 2020 · 3 comments

Comments

@okyeron
Copy link
Contributor

okyeron commented Sep 24, 2020

Earlier in the year I ported some code from Teensy to M0/M4 and for the application I need to set a custom serial number for the device (the serial number must be formatted a specific way).

setManufacturerDescriptor and setProductDescriptor are available with TinyUSB, but not serial number.

Thus I previously hacked to together changes to create a setSerialDescriptor(); function mimicking setProductDescriptor() and it worked ok in my limited testing (I believe I tested on ItsyBitsy M0 and Neotrellis M4).

I wanted to revisit this now and submit a proper PR.

However, since it's been awhile (since February), I'm a little fuzzy on my previous work. For SAMD21/SAMD51 I believe working around the defs in thegetSerialDescriptor() function in Adafruit_TinyUSB_SAMD.cpp would be required. Is that correct?

Work in progress here: https://github.com/okyeron/Adafruit_TinyUSB_ArduinoCore/tree/CustomSerialDescriptor

@hathach
Copy link
Member

hathach commented Sep 25, 2020

could you please submit it as PR, If it is still wip, you could make a draft one.

@okyeron
Copy link
Contributor Author

okyeron commented Sep 25, 2020

Got my WIP working well and added comments after posting this so will PR later today.

@henrygab
Copy link
Contributor

@okyeron ... this would be interesting to me also. Looking forward to seeing your work merged!

@hathach hathach transferred this issue from adafruit/Adafruit_TinyUSB_ArduinoCore May 18, 2021
@okyeron okyeron closed this as completed Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants