/* free buffer used from application by toggling the SW_BUF byte  */
void user_buffer_free(uint8_t ep_num, uint8_t dir)
/* free buffer used from application by toggling the SW_BUF byte  */
void user_buffer_free(uint8_t ep_num, uint8_t dir)
{
    if ((uint8_t)DBUF_EP_OUT == dir) {
        USBD_TX_DTG_TOGGLE(ep_num);
    } else if ((uint8_t)DBUF_EP_IN == dir) {
        USBD_RX_DTG_TOGGLE(ep_num);
    } else {
    }
}