projects
/
pub
/
lufa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add script reading bootloader flags
[pub/lufa.git]
/
Bootloaders
/
MassStorage
/
BootloaderAPI.c
diff --git
a/Bootloaders/MassStorage/BootloaderAPI.c
b/Bootloaders/MassStorage/BootloaderAPI.c
index
21d13bb
..
d1fb625
100644
(file)
--- a/
Bootloaders/MassStorage/BootloaderAPI.c
+++ b/
Bootloaders/MassStorage/BootloaderAPI.c
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 20
19
.
+ Copyright (C) Dean Camera, 20
21
.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 20
19
Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 20
21
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
@@
-35,10
+35,15
@@
#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;