1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2025-04-21 12:27:27 +03:00

tools/lib: added USB-SPI driver for ATUSB

- atusb-spi.c: ATUSB driver that uses the ATUSB_SPI_* functions instead
  of ATUSB_{REG,BUF,SRAM}_*
- driver.h, atrf.c (drivers, atrf_usb_handle): added atusb_spi_driver
- Makefile (OBJS): added atusb-spi.o
This commit is contained in:
Werner Almesberger
2011-06-19 15:11:30 -03:00
parent 9a0184cacb
commit a37bba8755
4 changed files with 175 additions and 2 deletions

View File

@@ -35,6 +35,7 @@ static const struct atrf_driver *drivers[] = {
#endif
#ifdef HAVE_USB
&atusb_driver,
&atusb_spi_driver,
#endif
&atnet_driver,
NULL
@@ -44,7 +45,7 @@ static const struct atrf_driver *drivers[] = {
void *atrf_usb_handle(struct atrf_dsc *dsc)
{
#ifdef HAVE_USB
if (dsc->driver == &atusb_driver)
if (dsc->driver == &atusb_driver || dsc->driver == &atusb_spi_driver)
return atusb_dev_handle(dsc->handle);
#endif
return NULL;