Clean up and consolidate SD-related code (#10832)

This commit is contained in:
Scott Lahteine 2018-05-24 01:19:12 -05:00 committed by GitHub
parent 766bcc6a70
commit ac293bdf95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 104 additions and 260 deletions

View file

@ -204,7 +204,7 @@ bool SdVolume::fatPut(uint32_t cluster, uint32_t value) {
index &= 0x1FF;
uint8_t tmp = value;
if (cluster & 1) {
tmp = (cacheBuffer_.data[index] & 0XF) | tmp << 4;
tmp = (cacheBuffer_.data[index] & 0xF) | tmp << 4;
}
cacheBuffer_.data[index] = tmp;
index++;