diff --git a/src/aio.c b/src/aio.c index be4df92..a1cc193 100644 --- a/src/aio.c +++ b/src/aio.c @@ -5,7 +5,8 @@ static const uint8_t buf_size = 32; // needs 32 bc of overflow issue on these aios? -#define POST_AND_GET_RESP(_req, resp_len) uint8_t req = _req; uint8_t resp[32]; aio_post(aio, &req, 1, resp, resp_len); +// posts cmd to the aio, puts n bytes of response inside resp buffer +#define POST_AND_GET_RESP(cmd, n) uint8_t req = cmd; uint8_t resp[32]; aio_post(aio, &req, 1, resp, n) static void aio_post(libusb_device_handle *dev, uint8_t *req, const int req_len, uint8_t *resp, const int resp_len) { libusb_bulk_transfer(dev, 0x01, req, req_len, NULL, 1000);