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