Author: stepan Date: 2008-09-26 21:27:48 +0200 (Fri, 26 Sep 2008) New Revision: 67
Modified: trunk/filo/drivers/newusb/usb.c Log: print an error at runtime rather than fail at compile time when USB support is not compiled in.
Modified: trunk/filo/drivers/newusb/usb.c =================================================================== --- trunk/filo/drivers/newusb/usb.c 2008-09-26 19:20:46 UTC (rev 66) +++ trunk/filo/drivers/newusb/usb.c 2008-09-26 19:27:48 UTC (rev 67) @@ -56,3 +56,21 @@ int result = -readwrite_blocks(devs[drive], sector, size, cbw_direction_data_in, buffer); return result; } + +int __attribute__((weak)) usb_initialize(void) +{ + printf("NOTE: In order to use USB support, your libpayload needs USB" + " support enabled, too.\n"); + + return 0; +} + +int __attribute__((weak)) readwrite_blocks (usbdev_t *dev, int start, int n, cbw_direction dir, u8 *buf) +{ + return 1; +} + +void __attribute__((weak)) usb_poll(void) +{ +} +