diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2013-10-27 02:35:46 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2013-10-27 02:35:46 +0200 |
commit | 9546f5d023c98bb3bcbdc2dd939ae9a2d8997154 (patch) | |
tree | 5627e4b366fa75ff0a4c27971877f77c7cb1a27d | |
parent | 7d7daafc1a84637caf27ee2ddbda915c92d2f264 (diff) |
Updated for v1.1 hardware.
-rw-r--r-- | bootloader.cpp | 6 | ||||
-rw-r--r-- | main.cpp | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/bootloader.cpp b/bootloader.cpp index b9e56b6..5c00337 100644 --- a/bootloader.cpp +++ b/bootloader.cpp @@ -40,7 +40,7 @@ auto report_desc = pack( ) ); -auto dev_desc = device_desc(0x200, 0, 0, 0, 64, 0x1d50, 0x6084, 0, 1, 2, 3, 1); +auto dev_desc = device_desc(0x200, 0, 0, 0, 64, 0x1d50, 0x6084, 0x110, 1, 2, 3, 1); auto conf_desc = configuration_desc(1, 1, 0, 0xc0, 0, // HID interface. interface_desc(0, 0, 1, 0x03, 0x00, 0x00, 0, @@ -60,7 +60,8 @@ static Pin usb_pu = GPIOA[15]; static PinArray button_inputs = GPIOB.array(0, 10); static PinArray button_leds = GPIOC.array(0, 10); -static Pin led1 = GPIOB[14]; +static Pin led1 = GPIOA[8]; +static Pin led2 = GPIOA[9]; USB_f1 usb(USB, dev_desc_p, conf_desc_p); @@ -281,6 +282,7 @@ int main() { button_leds.set_mode(Pin::Output); led1.set_mode(Pin::Output); + led2.set_mode(Pin::Output); if(normal_boot()) { chainload(0x8002000); @@ -160,7 +160,7 @@ auto report_desc = gamepad( feature(0x02) // HID bootloader function ); -auto dev_desc = device_desc(0x200, 0, 0, 0, 64, 0x1d50, 0x6080, 0, 1, 2, 3, 1); +auto dev_desc = device_desc(0x200, 0, 0, 0, 64, 0x1d50, 0x6080, 0x110, 1, 2, 3, 1); auto conf_desc = configuration_desc(1, 1, 0, 0xc0, 0, // HID interface. interface_desc(0, 0, 1, 0x03, 0x00, 0x00, 0, @@ -185,7 +185,8 @@ static Pin qe1b = GPIOA[1]; static Pin qe2a = GPIOA[6]; static Pin qe2b = GPIOA[7]; -static Pin led1 = GPIOB[14]; +static Pin led1 = GPIOA[8]; +static Pin led2 = GPIOA[9]; USB_f1 usb(USB, dev_desc_p, conf_desc_p); @@ -329,6 +330,9 @@ int main() { led1.set_mode(Pin::Output); led1.on(); + led2.set_mode(Pin::Output); + led2.on(); + RCC.enable(RCC.TIM2); RCC.enable(RCC.TIM3); |