Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
5d816416
Commit
5d816416
authored
Nov 29, 2015
by
danicampora
Browse files
cc3200: Correct buffer offset in serial flash diskio module.
parent
b8cfb0d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
cc3200/fatfs/src/drivers/sflash_diskio.c
View file @
5d816416
...
...
@@ -96,7 +96,7 @@ DRESULT sflash_disk_status(void) {
if
(
!
sflash_init_done
)
{
return
STA_NOINIT
;
}
return
0
;
return
RES_OK
;
}
DRESULT
sflash_disk_read
(
BYTE
*
buff
,
DWORD
sector
,
UINT
count
)
{
...
...
@@ -126,7 +126,7 @@ DRESULT sflash_disk_read(BYTE *buff, DWORD sector, UINT count) {
}
// Copy the requested sector from the block cache
memcpy
(
buff
,
&
sflash_block_cache
[(
secindex
*
SFLASH_SECTOR_SIZE
)],
SFLASH_SECTOR_SIZE
);
buff
+=
SFLASH_
BLOCK
_SIZE
;
buff
+=
SFLASH_
SECTOR
_SIZE
;
}
return
RES_OK
;
}
...
...
@@ -161,7 +161,7 @@ DRESULT sflash_disk_write(const BYTE *buff, DWORD sector, UINT count) {
}
// Copy the input sector to the block cache
memcpy
(
&
sflash_block_cache
[(
secindex
*
SFLASH_SECTOR_SIZE
)],
buff
,
SFLASH_SECTOR_SIZE
);
buff
+=
SFLASH_
BLOCK
_SIZE
;
buff
+=
SFLASH_
SECTOR
_SIZE
;
sflash_cache_is_dirty
=
true
;
}
while
(
++
index
<
count
);
...
...
Write
Preview
Supports
Markdown
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