Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
4c0f664b
Commit
4c0f664b
authored
May 02, 2018
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stm32/flash: Remove unused src parameter from flash_erase().
parent
edb600b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
ports/stm32/flash.c
ports/stm32/flash.c
+2
-2
ports/stm32/flash.h
ports/stm32/flash.h
+1
-1
ports/stm32/flashbdev.c
ports/stm32/flashbdev.c
+2
-2
No files found.
ports/stm32/flash.c
View file @
4c0f664b
...
...
@@ -142,7 +142,7 @@ uint32_t flash_get_sector_info(uint32_t addr, uint32_t *start_addr, uint32_t *si
return
0
;
}
void
flash_erase
(
uint32_t
flash_dest
,
const
uint32_t
*
src
,
uint32_t
num_word32
)
{
void
flash_erase
(
uint32_t
flash_dest
,
uint32_t
num_word32
)
{
// check there is something to write
if
(
num_word32
==
0
)
{
return
;
...
...
@@ -192,7 +192,7 @@ void flash_erase(uint32_t flash_dest, const uint32_t *src, uint32_t num_word32)
/*
// erase the sector using an interrupt
void flash_erase_it(uint32_t flash_dest,
const uint32_t *src,
uint32_t num_word32) {
void flash_erase_it(uint32_t flash_dest, uint32_t num_word32) {
// check there is something to write
if (num_word32 == 0) {
return;
...
...
ports/stm32/flash.h
View file @
4c0f664b
...
...
@@ -27,7 +27,7 @@
#define MICROPY_INCLUDED_STM32_FLASH_H
uint32_t
flash_get_sector_info
(
uint32_t
addr
,
uint32_t
*
start_addr
,
uint32_t
*
size
);
void
flash_erase
(
uint32_t
flash_dest
,
const
uint32_t
*
src
,
uint32_t
num_word32
);
void
flash_erase
(
uint32_t
flash_dest
,
uint32_t
num_word32
);
void
flash_write
(
uint32_t
flash_dest
,
const
uint32_t
*
src
,
uint32_t
num_word32
);
#endif // MICROPY_INCLUDED_STM32_FLASH_H
ports/stm32/flashbdev.c
View file @
4c0f664b
...
...
@@ -205,7 +205,7 @@ static void flash_bdev_irq_handler(void) {
// This code uses interrupts to erase the flash
/*
if (flash_erase_state == 0) {
flash_erase_it(flash_cache_sector_start,
(const uint32_t*)CACHE_MEM_START_ADDR,
flash_cache_sector_size / 4);
flash_erase_it(flash_cache_sector_start, flash_cache_sector_size / 4);
flash_erase_state = 1;
return;
}
...
...
@@ -223,7 +223,7 @@ static void flash_bdev_irq_handler(void) {
// This code erases the flash directly, waiting for it to finish
if
(
!
(
flash_flags
&
FLASH_FLAG_ERASED
))
{
flash_erase
(
flash_cache_sector_start
,
(
const
uint32_t
*
)
CACHE_MEM_START_ADDR
,
flash_cache_sector_size
/
4
);
flash_erase
(
flash_cache_sector_start
,
flash_cache_sector_size
/
4
);
flash_flags
|=
FLASH_FLAG_ERASED
;
return
;
}
...
...
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