mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-05 12:34:05 +02:00
atusb/fw/ep0.c (my_setup): fixed test for ATUSB_SPI_READ2
This commit is contained in:
parent
a37bba8755
commit
3f74098ce2
@ -218,7 +218,7 @@ static int my_setup(const struct setup_request *setup)
|
|||||||
case ATUSB_FROM_DEV(ATUSB_SPI_READ2):
|
case ATUSB_FROM_DEV(ATUSB_SPI_READ2):
|
||||||
spi_begin();
|
spi_begin();
|
||||||
spi_send(setup->wValue);
|
spi_send(setup->wValue);
|
||||||
if (req == ATUSB_SPI_READ2)
|
if (req == ATUSB_FROM_DEV(ATUSB_SPI_READ2))
|
||||||
spi_send(setup->wIndex);
|
spi_send(setup->wIndex);
|
||||||
for (i = 0; i != setup->wLength; i++)
|
for (i = 0; i != setup->wLength; i++)
|
||||||
buf[i] = spi_recv();
|
buf[i] = spi_recv();
|
||||||
|
Loading…
Reference in New Issue
Block a user