cleanup USB string things

This commit is contained in:
NIIBE Yutaka
2015-07-16 10:35:08 +09:00
parent e041a2aa7d
commit be5c052531
5 changed files with 8 additions and 10 deletions

View File

@@ -33,8 +33,6 @@
#include "stm32f103.h"
#include "adc.h"
#include "config.h"
#define NEUG_CRC32_COUNTS 4
#define STM32_ADC_ADC1_DMA_PRIORITY 2

2
src/configure vendored
View File

@@ -290,7 +290,7 @@ output_vendor_product_serial_strings () {
if test -n "$prefix"; then
echo
echo "static uint8_t ${prefix}string_serial[] = {"
echo "uint8_t ${prefix}string_serial[] = {"
echo " ${#SERIALNO}*2+2+16, /* bLength */"
echo " USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */"
echo " /* Serial number: \"$SERIALNO\" */"

View File

@@ -413,7 +413,7 @@ void flash_cnt123_write_internal (const uint8_t *p, int which, int v);
void flash_do_write_internal (const uint8_t *p, int nr,
const uint8_t *data, int len);
extern const uint8_t gnukStringSerial[];
extern const uint8_t gnuk_string_serial[];
#define LED_ONESHOT (1)
#define LED_TWOSHOTS (2)

View File

@@ -126,7 +126,7 @@ extern void *USBthread (void *arg);
static void
device_initialize_once (void)
{
const uint8_t *p = &gnukStringSerial[ID_OFFSET];
const uint8_t *p = &gnuk_string_serial[ID_OFFSET];
if (p[0] == 0xff && p[1] == 0xff && p[2] == 0xff && p[3] == 0xff)
{

View File

@@ -315,7 +315,7 @@ static const uint8_t gnukConfigDescriptor[] = {
/* USB String Descriptors */
static const uint8_t gnukStringLangID[] = {
static const uint8_t gnuk_string_lang_id[] = {
4, /* bLength */
USB_STRING_DESCRIPTOR_TYPE,
0x09, 0x04 /* LangID = 0x0409: US-English */
@@ -331,10 +331,10 @@ struct desc
};
static const struct desc string_descriptors[] = {
{gnukStringLangID, sizeof (gnukStringLangID)},
{gnukStringVendor, sizeof (gnukStringVendor)},
{gnukStringProduct, sizeof (gnukStringProduct)},
{gnukStringSerial, sizeof (gnukStringSerial)},
{gnuk_string_lang_id, sizeof (gnuk_string_lang_id)},
{gnuk_string_vendor, sizeof (gnuk_string_vendor)},
{gnuk_string_product, sizeof (gnuk_string_product)},
{gnuk_string_serial, sizeof (gnuk_string_serial)},
{gnuk_revision_detail, sizeof (gnuk_revision_detail)},
{gnuk_config_options, sizeof (gnuk_config_options)},
{sys_version, sizeof (sys_version)},