diff options
author | Keith Packard <keithp@keithp.com> | 2010-08-24 04:02:27 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-08-24 04:02:27 -0700 |
commit | ba086cc77273efe5397f60dcaccd1e3771441481 (patch) | |
tree | 27ead6cab5ca502388462d486b4ce9bf4d55ef47 /src | |
parent | 220f3afdaa432c65f8ad45be7cdbe5c8a3616db3 (diff) |
altosui: write USB serial number string while flashing
USB serial number is encoded in UCS2 as a part of the string
descriptors. Place those right after the other rom config bits so that
altosui can find it. altosui is changed to write the serial number there.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ao.h | 5 | ||||
-rw-r--r-- | src/ao_product.c | 2 |
2 files changed, 4 insertions, 3 deletions
@@ -293,12 +293,13 @@ ao_led_init(uint8_t enable); * ao_romconfig.c */ -#define AO_ROMCONFIG_VERSION 1 +#define AO_ROMCONFIG_VERSION 2 extern __code __at (0x00a0) uint16_t ao_romconfig_version; extern __code __at (0x00a2) uint16_t ao_romconfig_check; extern __code __at (0x00a4) uint16_t ao_serial_number; extern __code __at (0x00a6) uint32_t ao_radio_cal; +extern __code __at (0x00aa) uint8_t ao_usb_descriptors []; /* * ao_usb.c @@ -1008,7 +1009,7 @@ ao_rssi_init(uint8_t rssi_led); * each instance of a product */ -extern const uint8_t ao_usb_descriptors []; +extern __code __at(0x00aa) uint8_t ao_usb_descriptors []; extern const char ao_version[]; extern const char ao_manufacturer[]; extern const char ao_product[]; diff --git a/src/ao_product.c b/src/ao_product.c index f0eb4c07..82d6298f 100644 --- a/src/ao_product.c +++ b/src/ao_product.c @@ -28,7 +28,7 @@ const char ao_product[] = AO_iProduct_STRING; #define LE_WORD(x) ((x)&0xFF),((uint8_t) (((uint16_t) (x))>>8)) /* USB descriptors in one giant block of bytes */ -const uint8_t ao_usb_descriptors [] = +__code __at(0x00aa) uint8_t ao_usb_descriptors [] = { /* Device descriptor */ 0x12, |