#include "serial_hid.h"
#include <string.h>
-/** @cond PRIVATE */
#define LOG_PREFIX "serial-cp2110"
-/** @endcond */
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_LIBHIDAPI
buffer[0] = CP2110_FIFO_PURGE;
buffer[1] = CP2110_FIFO_PURGE_TX | CP2110_FIFO_PURGE_RX;
rc = ser_hid_hidapi_set_data(serial, 0, buffer, sizeof(buffer), 0);
- if (rc != 0)
+ if (rc != sizeof(buffer))
return SR_ERR;
return SR_OK;
}