mirror of
https://github.com/eddyem/stm32samples.git
synced 2025-12-06 10:45:11 +03:00
throw out shit
This commit is contained in:
parent
87d9bc17c7
commit
61c2d0ce41
Binary file not shown.
@ -128,9 +128,9 @@ static int write2flash(const void *start, const void *wrdata, uint32_t stor_size
|
|||||||
if(FLASH->SR & FLASH_SR_PGSERR){
|
if(FLASH->SR & FLASH_SR_PGSERR){
|
||||||
ret = 1; // program error - meet not 0xffff
|
ret = 1; // program error - meet not 0xffff
|
||||||
break;
|
break;
|
||||||
}else{
|
}/*else{
|
||||||
for(int _ = 0; _ < 9999 && (!(FLASH->SR & FLASH_SR_EOP)); ++_);
|
for(int _ = 0; _ < 9999 && (!(FLASH->SR & FLASH_SR_EOP)); ++_);
|
||||||
}
|
}*/
|
||||||
FLASH->SR = 0xffff;
|
FLASH->SR = 0xffff;
|
||||||
}
|
}
|
||||||
FLASH->CR &= ~(FLASH_CR_PG); // 7: clear PG bit at end of process
|
FLASH->CR &= ~(FLASH_CR_PG); // 7: clear PG bit at end of process
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user