Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos SimpleDMA FreescaleIAP eeprom
Fork of CDMS_CODE_FM_28JAN2017 by
Diff: SDC_init.h
- Revision:
- 69:20f09a0c3fd2
- Parent:
- 1:a0055b3280c8
diff -r 5c59f28620bc -r 20f09a0c3fd2 SDC_init.h
--- a/SDC_init.h Fri Jan 15 12:02:12 2016 +0000
+++ b/SDC_init.h Sun Jan 17 14:04:08 2016 +0000
@@ -56,10 +56,10 @@
// start_block_num =10 ; // Read from TC
// end_block_num =Science_TMframe::SDC_address ; // Read from TC
-// printf("welcome\n");
+// //gPC.printf("welcome\n");
initialise_card();
int result= initialise_card();
-// printf("initialise card result=%d\n",result);
+// //gPC.printf("initialise card result=%d\n",result);
disk_initialize();
}
@@ -84,11 +84,11 @@
// send CMD8 to determine whther it is ver 2.x
int r = cmd8();
if (r == R1_IDLE_STATE) {
-// printf("Entering v2 bro\n");
+// //gPC.printf("Entering v2 bro\n");
return initialise_card_v2();
} else if (r == (R1_IDLE_STATE | R1_ILLEGAL_COMMAND)) {
- printf("Entering v1 bro\n");
+ //gPC.printf("Entering v1 bro\n");
return initialise_card_v1();
} else {
@@ -102,7 +102,7 @@
for (int i = 0; i < SD_COMMAND_TIMEOUT; i++) {
cmd(55, 0);
if (cmd(41, 0) == 0) {
- // printf("Yuppie v1 successful\n");
+ // //gPC.printf("Yuppie v1 successful\n");
cdv = 512;
debug_if(SD_DBG, "\n\rInit: SEDCARD_V1\n\r");
@@ -122,7 +122,7 @@
cmd58();
cmd(55, 0);
if (cmd(41, 0x40000000) == 0) {
- // printf("Yuppie,v2 successful\n");
+ // //gPC.printf("Yuppie,v2 successful\n");
cmd58();
debug_if(SD_DBG, "\n\rInit: SDCARD_V2\n\r");
cdv = 1;
@@ -328,7 +328,7 @@
debug("Set 512-byte block timed out\n");
return 1;
} else {
- // printf("Hey,block init succesful\n");
+ // //gPC.printf("Hey,block init succesful\n");
}
spi.frequency(1000000); // Set to 1MHz for data transfer
@@ -345,7 +345,7 @@
// send the data block
write(buffer, 512);
- //printf("Written Successfully bro \n");
+ ////gPC.printf("Written Successfully bro \n");
return 0;
}
