Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utility/Sd2Card.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ uint32_t Sd2Card::cardSize(void) {
return (uint32_t)(c_size + 1) << (c_size_mult + read_bl_len - 7);
} else if (csd.v2.csd_ver == 1) {
uint32_t c_size = ((uint32_t)csd.v2.c_size_high << 16)
| (csd.v2.c_size_mid << 8) | csd.v2.c_size_low;
| ((uint32_t)csd.v2.c_size_mid << 8) | csd.v2.c_size_low;
return (c_size + 1) << 10;
} else {
error(SD_CARD_ERROR_BAD_CSD);
Expand Down
2 changes: 1 addition & 1 deletion src/utility/SdInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ typedef struct CSDV2 {
unsigned write_blk_misalign : 1;
unsigned read_bl_partial : 1;
// byte 7
unsigned reserved3 : 2;
unsigned c_size_high : 6;
unsigned reserved3 : 2;
// byte 8
uint8_t c_size_mid;
// byte 9
Expand Down