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
f5652187
Commit
f5652187
authored
Mar 02, 2017
by
Arnim Läuger
Committed by
Johny Mattsson
Mar 02, 2017
Browse files
use flash size byte to determine the location of the init data for byte 107 (#1827)
parent
a26969b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/adc.c
View file @
f5652187
...
...
@@ -29,7 +29,7 @@ static int adc_init107( lua_State *L )
{
uint8_t
byte107
=
luaL_checkinteger
(
L
,
1
);
uint32
init_sector
=
flash_
safe
_get_sec_num
()
-
4
;
uint32
init_sector
=
flash_
rom
_get_sec_num
()
-
4
;
// Note 32bit alignment so we can safely cast to uint32 for the flash api
char
init_data
[
SPI_FLASH_SEC_SIZE
]
__attribute__
((
aligned
(
4
)));
...
...
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