diff options
author | Jenna Fox <a@creativepony.com> | 2012-09-24 01:49:35 +1000 |
---|---|---|
committer | Jenna Fox <a@creativepony.com> | 2012-09-24 01:49:35 +1000 |
commit | ff8457ce060a4f5ece83612bbc1eae298344baae (patch) | |
tree | 40f498bd2ccd06c5f88d86ee7c3663a2c47876a0 /firmware/main.c | |
parent | d3992408b12e9cc8a874e739e02be3615c59af0b (diff) | |
download | micronucleus-ff8457ce060a4f5ece83612bbc1eae298344baae.tar.gz micronucleus-ff8457ce060a4f5ece83612bbc1eae298344baae.tar.bz2 micronucleus-ff8457ce060a4f5ece83612bbc1eae298344baae.zip |
remove redundant UBOOT_VERSION part of :get_info usb function
Diffstat (limited to 'firmware/main.c')
-rw-r--r-- | firmware/main.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/firmware/main.c b/firmware/main.c index 1b0369c..3787850 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -8,6 +8,8 @@ * License: GNU GPL v2 (see License.txt) * This Revision: $Id: main.c 786 2010-05-30 20:41:40Z cs $ */ + +#define UBOOT_VERSION 1 #include <avr/io.h> #include <avr/interrupt.h> @@ -23,7 +25,6 @@ static void leaveBootloader() __attribute__((__noreturn__)); #include "bootloaderconfig.h" #include "usbdrv/usbdrv.c" -#define UBOOT_VERSION 1 // how many milliseconds should host wait till it sends another write? // this needs to be above 9, but 20 is only sensible for testing #define UBOOT_WRITE_SLEEP 12 @@ -59,11 +60,11 @@ static void leaveBootloader() __attribute__((__noreturn__)); #define addr_t uint -typedef union longConverter{ - addr_t l; - uint w[sizeof(addr_t)/2]; - uchar b[sizeof(addr_t)]; -} longConverter_t; +// typedef union longConverter{ +// addr_t l; +// uint w[sizeof(addr_t)/2]; +// uchar b[sizeof(addr_t)]; +// } longConverter_t; //////// Stuff Bluebie Added #define PROGMEM_SIZE (BOOTLOADER_ADDRESS - 6) @@ -170,8 +171,7 @@ static void fillFlashWithVectors(void) { static uchar usbFunctionSetup(uchar data[8]) { usbRequest_t *rq = (void *)data; - static uchar replyBuffer[5] = { - UBOOT_VERSION, + static uchar replyBuffer[4] = { (((uint)PROGMEM_SIZE) >> 8) & 0xff, ((uint)PROGMEM_SIZE) & 0xff, SPM_PAGESIZE, @@ -180,7 +180,7 @@ static uchar usbFunctionSetup(uchar data[8]) { if (rq->bRequest == 0) { // get device info usbMsgPtr = replyBuffer; - return 5; + return 4; } else if (rq->bRequest == 1) { // write page writeLength = rq->wValue.word; |