SdFat-beta icon indicating copy to clipboard operation
SdFat-beta copied to clipboard

Problem

Open szybkijanek opened this issue 5 years ago • 1 comments

Hi i download beta version SdFat, when replace 1:1 with stable 1.1.2 and now have error: 'mbr_t', 'mbr', 'part_t', 'pt' was not declared in this scope. My program was tested on Your stable version 1.0.7 and 1.1.2 so maybe something is with this beta version. errors.txt

szybkijanek avatar Apr 28 '20 17:04 szybkijanek

Many structs have been modified and renamed to support boards with big/little endian problems.

The new defs are mostly in FsStructs.h.

Here are structs for mbr_t and part_t

//-----------------------------------------------------------------------------
const uint16_t MBR_SIGNATURE = 0xAA55;
const uint16_t PBR_SIGNATURE = 0xAA55;

typedef struct mbrPartition {
  uint8_t boot;
  uint8_t beginCHS[3];
  uint8_t type;
  uint8_t endCHS[3];
  uint8_t relativeSectors[4];
  uint8_t totalSectors[4];
} MbrPart_t;
//-----------------------------------------------------------------------------
typedef struct masterBootRecordSector {
  uint8_t   bootCode[446];
  MbrPart_t part[4];
  uint8_t   signature[2];
} MbrSector_t;

greiman avatar Apr 28 '20 19:04 greiman