/* Respond on ep 0. 
Auxiliary function for sending respond on endpoint 0  */
static void respond_setup_data(nrf_drv_usbd_setup_t const *const p_setup, void const *p_data, size_t size)
/* Respond on ep 0. 
Auxiliary function for sending respond on endpoint 0  */
static void respond_setup_data(nrf_drv_usbd_setup_t const *const p_setup, void const *p_data, size_t size)
{
    if(size > p_setup->wLength)
    {
        size = p_setup->wLength;
    }
    ret_code_t ret;
    nrf_drv_usbd_transfer_t transfer =
    {
        .p_data = {.tx = p_data},
        .size = size
    };
    ret = nrf_drv_usbd_ep_transfer(NRF_DRV_USBD_EPIN0, &transfer, NULL);
    if(ret != NRF_SUCCESS)
    {
        NRF_LOG_ERROR("Transfer failed: %08x", (uint32_t)ret);
    }
    ASSERT(ret == NRF_SUCCESS);
    UNUSED_VARIABLE(ret);
}