revice system service, version string

This commit is contained in:
NIIBE Yutaka
2012-05-31 08:58:08 +09:00
parent 093c98bb0f
commit ab51c5421d
6 changed files with 38 additions and 24 deletions

View File

@@ -30,15 +30,6 @@
extern uint8_t __flash_start__, __flash_end__;
static const uint8_t *
unique_device_id (void)
{
/* STM32F103 has 96-bit unique device identifier */
const uint8_t *addr = (const uint8_t *)0x1ffff7e8;
return addr;
}
static void
usb_cable_config (int enable)
{
@@ -295,7 +286,6 @@ extern uint8_t __ram_end__;
handler vector[] __attribute__ ((section(".vectors"))) = {
(handler)&__ram_end__,
reset,
(handler)unique_device_id,
(handler)set_led,
flash_unlock,
(handler)flash_program_halfword,
@@ -308,3 +298,10 @@ handler vector[] __attribute__ ((section(".vectors"))) = {
usb_lld_sys_shutdown,
nvic_system_reset,
};
const uint8_t sys_version[8] __attribute__((section(".sys.version"))) = {
3*2+2, /* bLength */
0x03, /* bDescriptorType = USB_STRING_DESCRIPTOR_TYPE*/
/* sys version: "1.0" */
'1', 0, '.', 0, '0', 0,
};