diff options
Diffstat (limited to 'firmware/usbstack')
| -rw-r--r-- | firmware/usbstack/usb_charging_only.c | 4 | ||||
| -rw-r--r-- | firmware/usbstack/usb_core.c | 16 | ||||
| -rw-r--r-- | firmware/usbstack/usb_hid.c | 4 | ||||
| -rw-r--r-- | firmware/usbstack/usb_serial.c | 4 | ||||
| -rw-r--r-- | firmware/usbstack/usb_storage.c | 4 |
5 files changed, 8 insertions, 24 deletions
diff --git a/firmware/usbstack/usb_charging_only.c b/firmware/usbstack/usb_charging_only.c index fc6139c..8dd9fdf 100644 --- a/firmware/usbstack/usb_charging_only.c +++ b/firmware/usbstack/usb_charging_only.c @@ -29,8 +29,6 @@ //#define LOGF_ENABLE #include "logf.h" -#ifdef USB_CHARGING_ONLY - /* charging_only interface */ static struct usb_interface_descriptor __attribute__((aligned(2))) interface_descriptor = @@ -70,5 +68,3 @@ int usb_charging_only_get_config_descriptor(unsigned char *dest,int max_packet_s return (dest-orig_dest); } - -#endif /*USB_CHARGING_ONLY*/ diff --git a/firmware/usbstack/usb_core.c b/firmware/usbstack/usb_core.c index 81333fe..c4450af 100644 --- a/firmware/usbstack/usb_core.c +++ b/firmware/usbstack/usb_core.c @@ -31,19 +31,19 @@ #include "usb_core.h" #include "usb_class_driver.h" -#if defined(USB_STORAGE) +#if defined(USB_ENABLE_STORAGE) #include "usb_storage.h" #endif -#if defined(USB_SERIAL) +#if defined(USB_ENABLE_SERIAL) #include "usb_serial.h" #endif -#if defined(USB_CHARGING_ONLY) +#if defined(USB_ENABLE_CHARGING_ONLY) #include "usb_charging_only.h" #endif -#if defined(USB_HID) +#if defined(USB_ENABLE_HID) #include "usb_hid.h" #endif @@ -182,7 +182,7 @@ static struct static struct usb_class_driver drivers[USB_NUM_DRIVERS] = { -#ifdef USB_STORAGE +#ifdef USB_ENABLE_STORAGE [USB_DRIVER_MASS_STORAGE] = { .enabled = false, .needs_exclusive_storage = true, @@ -201,7 +201,7 @@ static struct usb_class_driver drivers[USB_NUM_DRIVERS] = #endif }, #endif -#ifdef USB_SERIAL +#ifdef USB_ENABLE_SERIAL [USB_DRIVER_SERIAL] = { .enabled = false, .needs_exclusive_storage = false, @@ -220,7 +220,7 @@ static struct usb_class_driver drivers[USB_NUM_DRIVERS] = #endif }, #endif -#ifdef USB_CHARGING_ONLY +#ifdef USB_ENABLE_CHARGING_ONLY [USB_DRIVER_CHARGING_ONLY] = { .enabled = false, .needs_exclusive_storage = false, @@ -239,7 +239,7 @@ static struct usb_class_driver drivers[USB_NUM_DRIVERS] = #endif }, #endif -#ifdef USB_HID +#ifdef USB_ENABLE_HID [USB_DRIVER_HID] = { .enabled = false, .needs_exclusive_storage = false, diff --git a/firmware/usbstack/usb_hid.c b/firmware/usbstack/usb_hid.c index 0c35da2..31554ee 100644 --- a/firmware/usbstack/usb_hid.c +++ b/firmware/usbstack/usb_hid.c @@ -28,8 +28,6 @@ //#define LOGF_ENABLE #include "logf.h" -#ifdef USB_HID - #define CONCAT(low, high) ((high << 8) | low) #define PACK_VAL1(dest, val) *(dest)++ = (val) & 0xff #define PACK_VAL2(dest, val) PACK_VAL1((dest), (val)); \ @@ -392,5 +390,3 @@ void usb_hid_send_consumer_usage(consumer_usage_page_t id) usb_hid_try_send_drv(); } - -#endif /*USB_HID*/ diff --git a/firmware/usbstack/usb_serial.c b/firmware/usbstack/usb_serial.c index 246938a..6c654ad 100644 --- a/firmware/usbstack/usb_serial.c +++ b/firmware/usbstack/usb_serial.c @@ -28,8 +28,6 @@ //#define LOGF_ENABLE #include "logf.h" -#ifdef USB_SERIAL - /* serial interface */ static struct usb_interface_descriptor __attribute__((aligned(2))) interface_descriptor = @@ -240,5 +238,3 @@ void usb_serial_transfer_complete(int ep,int dir, int status, int length) break; } } - -#endif /*USB_SERIAL*/ diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c index b498311..63ff4f0 100644 --- a/firmware/usbstack/usb_storage.c +++ b/firmware/usbstack/usb_storage.c @@ -33,8 +33,6 @@ #include "usb_storage.h" -#ifdef USB_STORAGE - /* Enable the following define to export only the SD card slot. This * is useful for USBCV MSC tests, as those are destructive. * This won't work right if the device doesn't have a card slot. @@ -1158,5 +1156,3 @@ static void fill_inquiry(IF_MV_NONVOID(int lun)) tb.inquiry->DeviceTypeModifier = DEVICE_REMOVABLE; #endif } - -#endif /* USB_STORAGE */ |