Minor code cleanups for clarity.
[pub/USBasp.git] / Bootloaders / TeensyHID / TeensyHID.c
index f3d86a6..4b9224a 100644 (file)
@@ -41,7 +41,6 @@
  */\r
 bool RunBootloader = true;\r
 \r
-\r
 /** Main program entry point. This routine configures the hardware required by the bootloader, then continuously \r
  *  runs the bootloader processing routine until instructed to soft-exit.\r
  */\r
@@ -105,7 +104,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
                        {\r
                                Endpoint_ClearSETUP();\r
                                \r
-                               /* Wait until the command (report) has been sent by the host */\r
+                               /* Wait until the command has been sent by the host */\r
                                while (!(Endpoint_IsOUTReceived()));\r
                        \r
                                /* Read in the write destination address */\r
@@ -123,7 +122,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
                                        boot_spm_busy_wait();\r
                                        \r
                                        /* Write each of the FLASH page's bytes in sequence */\r
-                                       for (uint8_t PageByte = 0; PageByte < 128; PageByte += 2)\r
+                                       for (uint8_t PageByte = 0; PageByte < SPM_PAGESIZE; PageByte += 2)\r
                                        {\r
                                                /* Check if endpoint is empty - if so clear it and wait until ready for next packet */\r
                                                if (!(Endpoint_BytesInEndpoint()))\r