<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>[nRF52840] USB Vendor Specified Interface Class</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29498/nrf52840-usb-vendor-specified-interface-class</link><description>Hello, 
 I would like to implement a Vendor Specified Interface Class for use with libusb on the nRF52840 USB.
There are examples of HID, CDC, Audio, etc. But it is not clear to me how to define my own class.
Basically, I would like to configure one</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Jan 2018 17:05:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29498/nrf52840-usb-vendor-specified-interface-class" /><item><title>RE: [nRF52840] USB Vendor Specified Interface Class</title><link>https://devzone.nordicsemi.com/thread/117249?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2018 17:05:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa180cfd-db3b-417a-ad12-2270c9344dc2</guid><dc:creator>Andre</dc:creator><description>&lt;p&gt;I now have this for reception of data, seems to work fine&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    case NRF_DRV_USBD_EVT_EPTRANSFER:
    	if (NRF_DRV_USBD_EPOUT1 == p_event-&amp;gt;data.eptransfer.ep) {
    			static uint8_t receive_buffer[64];
    			static nrf_drv_usbd_ep_transfer_t usb_tranfer;
    		if (NRF_USBD_EP_WAITING == p_event-&amp;gt;data.eptransfer.status) {
    				usb_tranfer.p_data.rx = receive_buffer;
    				usb_tranfer.size = 64;
    				int ret = nrf_drv_usbd_ep_transfer(p_event-&amp;gt;data.eptransfer.ep, &amp;amp;usb_tranfer);
    
    		} else if (NRF_USBD_EP_OK == p_event-&amp;gt;data.eptransfer.status) {
    			size_t size = 0;
    			nrf_drv_usbd_ep_status_get(p_event-&amp;gt;data.eptransfer.ep, &amp;amp;size);
    				printf(&amp;quot;Received %d bytes:\n&amp;quot;, size);
    				for (int i = 0; i &amp;lt; size; i++) printf(&amp;quot;0x%02X &amp;quot;, receive_buffer[i]);
    				printf(&amp;quot;\n&amp;quot;);
    		} else {
    			printf(&amp;quot;Transfer failed on EPOUT1: %d\n&amp;quot;, p_event-&amp;gt;data.eptransfer.status);
    		}
    	}

...
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF52840] USB Vendor Specified Interface Class</title><link>https://devzone.nordicsemi.com/thread/117248?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2018 15:30:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d3b6f1d-80de-41b5-b35d-849826aac1eb</guid><dc:creator>Andre</dc:creator><description>&lt;p&gt;I have my Vendor Class USB Descriptors with BOS and MSOS20 Descriptors implemented. The device enumerates correctly under Windows 10.
However, how should I implement Endpoint OUT (PC to Microcontroller) transfers? More specifically, at which point should I do the nrf_drv_usbd_ep_transfer call for my OUT endpoint?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF52840] USB Vendor Specified Interface Class</title><link>https://devzone.nordicsemi.com/thread/117247?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2018 10:51:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c76d2a79-4730-4984-bd0c-10392738483f</guid><dc:creator>Andre</dc:creator><description>&lt;p&gt;I must have overlooked that example. I&amp;#39;m working on a test code derived from that example now. Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF52840] USB Vendor Specified Interface Class</title><link>https://devzone.nordicsemi.com/thread/117246?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2018 15:56:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d292ac7-03c9-406e-a2c7-a2078c691c04</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Have you looked at the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/usbd_example.html?cp=4_0_0_4_6_48_2"&gt;USB device example&lt;/a&gt; in the SDK? This example use the USB HAL and driver to emulate a HID mouse device. Or did you only want to use app_usbd library?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>