Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Add CDC class to the USB Device Example

I am developing a USB keyboard + mouse using a NRF52833. I have use the USB Device Example from nRF5 SDK v17.1.0. I chose this example because my project is in C++ and had problems compiling the USB HID Composite Example regarding to "designator order for field 'app_usbd_hid_inst_t::p_hid_methods' does not match declaration order in 'app_usbd_hid_inst_t'".

I have implemented the keyboard + mouse HID to my project since the original example only works as a mouse. Now I need to add the CDC class to have a serial com port, any suggestions or examples on how to do it?

Parents
  • I was able to add the CDC class with the USB device library from SDK 17.1.0 it works fine.

    Now I need some way to send the USB reports to the computer myself since the functions provided by the API only allow me to send single letters. Is there any way of doing this?

    With the legacy USB driver I used the nrfx_usbd_ep_transfer() function and everything worked fine.

Reply
  • I was able to add the CDC class with the USB device library from SDK 17.1.0 it works fine.

    Now I need some way to send the USB reports to the computer myself since the functions provided by the API only allow me to send single letters. Is there any way of doing this?

    With the legacy USB driver I used the nrfx_usbd_ep_transfer() function and everything worked fine.

Children
Related