- command mmcerror_t init ();
-
- command mmcerror_t setIdle();
-
- // we don't have pin for this one yet; it uses cd
- // command mmcerror_t detect();
-
- // change block length to 2^len bytes; default is 512
- command mmcerror_t setBlockLength (const uint16_t len);
-
- // see macro in module for writing to a sector instead of an address
- // read a block of size count from address
- command mmcerror_t readBlock(const uint32_t address, const uint16_t count, uint8_t * buffer);
- command mmcerror_t readSector(uint32_t sector, uint8_t * pBuffer);
+ /**
+ * Reads 512 bytes from the SD at sector and copies it to bufferPtr
+ *
+ * @param sector the sector on the SD card (in multiples of 512 bytes).
+ * @param bufferPtr pointer to where the SD will copy the data to. Must be 512 bytes.
+ * @return <code>SUCCESS<code> if it was read successfully; <code>FAIL<code> otherwise
+ */
+ command error_t readBlock(const uint32_t sector, uint8_t * buffer);