mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
atusb/fw: use the unique serial number of the ATmega8/16/32U2 for iSerialNumber
- usb/usb.h (USB_LANGID_ENGLISH_US): added USB LANGID for US-English - board.h (board_sernum), board.c (board_sernum, hex, get_sernum, board_init): provide the board's serial number in "board_sernum" (UTF-encoded) - sernum.h (sernum_get_descr), sernum.c (sernum_get_descr): return string descriptors for the serial number - descr.c (device_descriptor), usb/dfu.c (device_descriptor): set iSerialNumber if serial number is available - atusb.c (main), usb/dfu.c (my_descr): call sernum_get_descr for unknown descriptors - Makefile (OBJS, BOOT_OBJS): added sernum.o
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* fw/usb//usb.h - USB hardware setup and standard device requests
|
||||
*
|
||||
* Written 2008, 2009 by Werner Almesberger
|
||||
* Copyright 2008, 2009 Werner Almesberger
|
||||
* Written 2008, 2009, 2011 by Werner Almesberger
|
||||
* Copyright 2008, 2009, 2011 Werner Almesberger
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -74,6 +74,14 @@
|
||||
#define SET_INTERFACE 0x0b
|
||||
#define SYNCH_FRAME 0x0c
|
||||
|
||||
/*
|
||||
* USB Language ID codes
|
||||
*
|
||||
* http://www.usb.org/developers/docs/USB_LANGIDs.pdf
|
||||
*/
|
||||
|
||||
#define USB_LANGID_ENGLISH_US 0x409
|
||||
|
||||
|
||||
/*
|
||||
* Odd. sdcc seems to think "x" assumes the size of the destination, i.e.,
|
||||
|
||||
Reference in New Issue
Block a user