Merge pull request #49 from LemonBoy/erase_size

Correct calculation of the erase sector size
pull/7774/head
Deepika 2017-08-17 13:37:53 -05:00 committed by GitHub
commit 0ac12a0251
1 changed files with 1 additions and 1 deletions

View File

@ -948,7 +948,7 @@ uint32_t SDBlockDevice::_sd_sectors() {
_erase_size = BLOCK_SIZE_HC;
} else {
// ERASE_BLK_EN = 1: Erase in multiple of SECTOR_SIZE supported
_erase_size = ext_bits(csd, 45, 39);
_erase_size = BLOCK_SIZE_HC * (ext_bits(csd, 45, 39) + 1);
}
break;