Skip to content

Commit 76d09a1

Browse files
committed
cleanup
1 parent 7d08059 commit 76d09a1

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

src/utility/Sd2Card.cpp

+2-21
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ uint8_t Sd2Card::writeStop(void) {
783783
//------------------------------------------------------------------------------
784784
/** lock or unlock SD card by password
785785
*
786-
* \param[in] pwd si the pointer to passowrd buffer
786+
* \param[in] pwd si the pointer to password buffer
787787
* \return The value one, true, is returned for success and
788788
* the value zero, false, is returned for failure.
789789
*
@@ -816,35 +816,16 @@ uint8_t Sd2Card::lockUnlockCard(uint8_t flags, int pass_len, uint8_t* pwd) {
816816
spiSend( pwd[i] );
817817
}
818818

819-
/*
820-
//send fake CRC
821-
spiSend(0xFF);
822-
spiSend(0xFF);
823-
*/
824-
825819
// wait for response
826820
do {
827821
status_ = spiRec();
828822
} while ( status_ == 0xFF );
829823

830-
/*
831-
for (uint8_t i = 0; ((status_ = spiRec()) & 0x10) && i != 0xFF; i++) {
832-
Serial.println( status_, HEX );
833-
}
834-
*/
835-
836-
// wait for not busy
837-
// for (uint16_t i = 0; ( ~spiRec() ) && i != 0xFFFF; i++);
838824
uint8_t st;
839825
do {
840826
st = spiRec();
841827
} while ( st != 0xFF );
842-
/*
843-
if ( status_ != 0x05 ) {
844-
error(0x88);
845-
goto fail;
846-
}
847-
*/
828+
848829
status_ = cardCommand(CMD13, 0);
849830
uint8_t status_ext;
850831
status_ext = spiRec();

0 commit comments

Comments
 (0)