aes1610: Use convenience API to allocate USB receive buffer
This commit is contained in:
parent
7eb361087a
commit
4719b30f16
1 changed files with 1 additions and 3 deletions
|
@ -135,10 +135,8 @@ generic_read_ignore_data (FpiSsm *ssm, FpDevice *dev,
|
||||||
size_t bytes)
|
size_t bytes)
|
||||||
{
|
{
|
||||||
FpiUsbTransfer *transfer = fpi_usb_transfer_new (dev);
|
FpiUsbTransfer *transfer = fpi_usb_transfer_new (dev);
|
||||||
unsigned char *data;
|
|
||||||
|
|
||||||
data = g_malloc (bytes);
|
fpi_usb_transfer_fill_bulk (transfer, EP_IN, bytes);
|
||||||
fpi_usb_transfer_fill_bulk_full (transfer, EP_IN, data, bytes, g_free);
|
|
||||||
transfer->ssm = ssm;
|
transfer->ssm = ssm;
|
||||||
transfer->short_is_error = TRUE;
|
transfer->short_is_error = TRUE;
|
||||||
fpi_usb_transfer_submit (transfer, BULK_TIMEOUT, NULL,
|
fpi_usb_transfer_submit (transfer, BULK_TIMEOUT, NULL,
|
||||||
|
|
Loading…
Reference in a new issue