From b51d442c317c76425cac446818ade6ccc43952c4 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Thu, 23 Oct 2014 02:06:55 -0300 Subject: [PATCH] atusb/fw/usb/dfu.c (config_descriptor): correct alt settings off-by-one error --- atusb/fw/usb/dfu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atusb/fw/usb/dfu.c b/atusb/fw/usb/dfu.c index b15891c..28b1a69 100644 --- a/atusb/fw/usb/dfu.c +++ b/atusb/fw/usb/dfu.c @@ -95,10 +95,10 @@ const uint8_t config_descriptor[] = { /* Interface #0 */ DFU_ITF_DESCR(0, 0, dfu_proto_dfu, DFU_ALT_NAME_0_IDX) -#if DFU_ALT_SETTINGS >= 1 +#if DFU_ALT_SETTINGS > 1 DFU_ITF_DESCR(0, 1, dfu_proto_dfu, DFU_ALT_NAME_1_IDX) #endif -#if DFU_ALT_SETTINGS >= 2 +#if DFU_ALT_SETTINGS > 2 DFU_ITF_DESCR(0, 2, dfu_proto_dfu, DFU_ALT_NAME_2_IDX) #endif };