This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

APP GLOBAL DEF for class

Hi everyone,

Is there a function like APP_USBD_CDC_ACM_GLOBAL_DEF or APP_USBD_MSC_GLOBAL_DEF that allow to define a custom class?

I want to define a custom class using app function but in the nordic infocenter I didn't find any function like APP_USBD_CUSTOM_CLASS_GLOBAL_DEF.

BR

Sorry for my english but I'm sweden,

  • Hi,

     

     

    Is there a function like APP_USBD_CDC_ACM_GLOBAL_DEF or APP_USBD_MSC_GLOBAL_DEF that allow to define a custom class?

    No, unfortunately its not. If you want to setup your own app usbd class, you have to develop such a library.

      

    I want to define a custom class using app function ( high level library, as is done in CDC ACM example) but in the nordic infocenter I didn't find any function like APP_USBD_CUSTOM_CLASS_GLOBAL_DEF.

     If you want to do that, you should look into how the subsystem works:

    https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_usbd.html?cp=7_1_3_56

    If you want to setup your own usb class/custom descriptor, I can also recommend looking at the usbd example in the sdk:

    nRF5_SDK_17.0.2_d674dde/examples/peripheral/usbd

     

    This uses the driver directly, and exposes most low-level usb specific functionality.

     

    Kind regards,

    Håkon

  • If you want to setup your own usb class/custom descriptor, I can also recommend looking at the usbd example in the sdk:

    nRF5_SDK_17.0.2_d674dde/examples/peripheral/usbd

    Yes I started from USBD example and I setup my own class device. The problem is that I have a composite device (CDC ACM and custom class device). To init CDC ACM I use app_init, to init custom class device I use nrf_drv_usbd_init()...

    The problem is that there's a conflict and I don't know how to solve it.

Related