BuildTests: Remove 4KB variants of MassStorage bootloader on U6/U7 devices.
[pub/USBasp.git] / Bootloaders / MassStorage / BootloaderAPI.c
index c1e76d3..8fbe44f 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2018.
+     Copyright (C) Dean Camera, 2019.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2018  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2019  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
 
 #include "BootloaderAPI.h"
 
 
 #include "BootloaderAPI.h"
 
-static bool IsPageAddressValid(const uint32_t Address)
+bool IsPageAddressValid(const uint32_t Address)
 {
        /* Determine if the given page address is correctly aligned to the
 {
        /* Determine if the given page address is correctly aligned to the
-          start of a flash page. */
+          start of a flash page.
+
+          Note that this is not static, as we need to force it into the
+          AUX_BOOT_SECTION on small flash devices to save space.
+       */
+
        bool PageAddressIsAligned = !(Address & (SPM_PAGESIZE - 1));
 
        return (Address < BOOT_START_ADDR) && PageAddressIsAligned;
        bool PageAddressIsAligned = !(Address & (SPM_PAGESIZE - 1));
 
        return (Address < BOOT_START_ADDR) && PageAddressIsAligned;