0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

TinyUSB に自前のデバイスクラスドライバを組み込む

Last updated at Posted at 2023-08-30

これは何?

TinyUSB が提供するデバイスクラスドライバを override する方法を紹介します。

想定読者

TinyUSB を使って vendor クラスを実装したいんだけど、 TinyUSB のデフォルト実装だとやりたいことが出来ない人

結論

PR385 で追加された
usbd_app_driver_get_cb を実装し、自前デバイスクラスドライバの usbd_class_driver_t を返しましょう。

実装例は Raspberry pi Pico の resetデバイス があります。

補足

Device Stack の説明に次のような説明があります。上記結論と同様のことを書いています。

If you have a special requirement, usbd_app_driver_get_cb() can be used to write your own class driver without modifying the stack. Here is how the RPi team added their reset interface raspberrypi/pico-sdk#197
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?