Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
6a0599d2
You need to sign in or sign up before continuing.
Commit
6a0599d2
authored
Jan 27, 2015
by
funshine
Browse files
fix alignment
parent
425e6641
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/spiffs/spiffs.c
View file @
6a0599d2
...
...
@@ -45,7 +45,7 @@ The small 4KB sectors allow for greater flexibility in applications th
void
spiffs_mount
()
{
spiffs_config
cfg
;
cfg
.
phys_addr
=
(
u32_t
)
platform_flash_get_first_free_block_address
(
NULL
);
cfg
.
phys_addr
+=
0x
4
000
;
cfg
.
phys_addr
+=
0x
3
000
;
cfg
.
phys_addr
&=
0xFFFFC000
;
// align to 4 sector.
cfg
.
phys_size
=
INTERNAL_FLASH_SIZE
-
(
(
u32_t
)
cfg
.
phys_addr
-
INTERNAL_FLASH_START_ADDRESS
);
cfg
.
phys_erase_block
=
INTERNAL_FLASH_SECTOR_SIZE
;
// according to datasheet
...
...
@@ -76,7 +76,7 @@ int myspiffs_format( void )
SPIFFS_unmount
(
&
fs
);
u32_t
sect_first
,
sect_last
;
sect_first
=
(
u32_t
)
platform_flash_get_first_free_block_address
(
NULL
);
sect_first
+=
0x
4
000
;
sect_first
+=
0x
3
000
;
sect_first
&=
0xFFFFC000
;
// align to 4 sector.
sect_first
=
platform_flash_get_sector_of_address
(
sect_first
);
sect_last
=
INTERNAL_FLASH_SIZE
+
INTERNAL_FLASH_START_ADDRESS
-
4
;
...
...
pre_build/latest/nodemcu_latest.bin
View file @
6a0599d2
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment