ifdef-out USB strings for reGNUal
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
2012-06-01 Niibe Yutaka <gniibe@fsij.org>
|
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.
|
USB bug fixes.
|
||||||
* src/usb_ctrl.c (gnuk_usb_event): Bug fix for handling
|
* src/usb_ctrl.c (gnuk_usb_event): Bug fix for handling
|
||||||
USB_EVENT_CONFIG. Do nothing when current_conf == value.
|
USB_EVENT_CONFIG. Do nothing when current_conf == value.
|
||||||
|
|||||||
2
src/configure
vendored
2
src/configure
vendored
@@ -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 $PRODUCT | sed -n -e "s/\(........\)/\1\n/gp" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "s/ $//p"
|
||||||
echo '};'
|
echo '};'
|
||||||
echo
|
echo
|
||||||
|
echo '#ifdef USB_STRINGS_FOR_GNUK'
|
||||||
echo 'static const uint8_t gnuk_revision_detail[] = {'
|
echo 'static const uint8_t gnuk_revision_detail[] = {'
|
||||||
echo " ${#REVISION}*2+2, /* bLength */"
|
echo " ${#REVISION}*2+2, /* bLength */"
|
||||||
echo " USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */"
|
echo " USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */"
|
||||||
@@ -227,6 +228,7 @@ if !(IFS=" "
|
|||||||
echo " /* configure options: \"$CONFIG\" */"
|
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 $CONFIG | sed -n -e "s/\(........\)/\1\n/gp" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "s/ $//p"
|
||||||
echo '};'
|
echo '};'
|
||||||
|
echo '#endif'
|
||||||
) >usb-strings.c.inc
|
) >usb-strings.c.inc
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -254,6 +254,7 @@ static const uint8_t gnukStringLangID[] = {
|
|||||||
0x09, 0x04 /* LangID = 0x0409: US-English */
|
0x09, 0x04 /* LangID = 0x0409: US-English */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define USB_STRINGS_FOR_GNUK 1
|
||||||
#include "usb-strings.c.inc"
|
#include "usb-strings.c.inc"
|
||||||
|
|
||||||
const uint8_t gnukStringSerial[] = {
|
const uint8_t gnukStringSerial[] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user