ifdef-out USB strings for reGNUal

This commit is contained in:
NIIBE Yutaka
2012-06-01 13:15:13 +09:00
parent 42f9c16fd8
commit 441051a485
3 changed files with 7 additions and 0 deletions

View File

@@ -1,5 +1,9 @@
2012-06-01 Niibe Yutaka <gniibe@fsij.org>
* src/configure (usb-strings.c.inc): ifdef-out
gnuk_revision_detail and gnuk_config_options (for reGNUal).
* src/usb_desc.c (USB_STRINGS_FOR_GNUK): Define.
USB bug fixes.
* src/usb_ctrl.c (gnuk_usb_event): Bug fix for handling
USB_EVENT_CONFIG. Do nothing when current_conf == value.

2
src/configure vendored
View File

@@ -214,6 +214,7 @@ if !(IFS=" "
echo $PRODUCT | sed -n -e "s/\(........\)/\1\n/gp" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "s/ $//p"
echo '};'
echo
echo '#ifdef USB_STRINGS_FOR_GNUK'
echo 'static const uint8_t gnuk_revision_detail[] = {'
echo " ${#REVISION}*2+2, /* bLength */"
echo " USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */"
@@ -227,6 +228,7 @@ if !(IFS=" "
echo " /* configure options: \"$CONFIG\" */"
echo $CONFIG | sed -n -e "s/\(........\)/\1\n/gp" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "s/ $//p"
echo '};'
echo '#endif'
) >usb-strings.c.inc
exit 0
fi

View File

@@ -254,6 +254,7 @@ static const uint8_t gnukStringLangID[] = {
0x09, 0x04 /* LangID = 0x0409: US-English */
};
#define USB_STRINGS_FOR_GNUK 1
#include "usb-strings.c.inc"
const uint8_t gnukStringSerial[] = {