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.
Diff: Picaso_4DGL-32PTU_Media.cpp
- Revision:
- 13:1a0800957412
- Parent:
- 12:29f5ad896382
- Child:
- 14:561cb06a2739
--- a/Picaso_4DGL-32PTU_Media.cpp Wed Sep 14 13:27:37 2016 +0000 +++ b/Picaso_4DGL-32PTU_Media.cpp Thu Sep 15 08:04:37 2016 +0000 @@ -90,7 +90,7 @@ // After the read the Sector pointer is automatically incremented by 1. // Answer = acknowledge (byte) , status (word), block (sector) = 1 + 2 + 512 = 515 bytes //************************************************************************** -bool PICASO_4DGL :: media_ReadSector() { +bool PICASO_4DGL :: media_RdSector() { char command[2] = ""; @@ -100,7 +100,7 @@ writeCOMMAND(command, 2); bool success = readSectorResponse(515); #ifdef DEBUGMODE - pc.printf("\n\r DEBUG: Set sector address: %i\n\r", success); + pc.printf("\n\r DEBUG: Read sector: %i\n\r", success); #endif return success; } @@ -110,7 +110,7 @@ // block into the uSD card. After the write the Sect pointer is automatically incremented by 1. // Response = acknowledge (byte) , status (word) //************************************************************************** -bool PICASO_4DGL :: media_WriteSector(char *block) { +bool PICASO_4DGL :: media_WrSector(char *block) { char command[514] = ""; @@ -119,10 +119,7 @@ int j = 2; int k = 0; - for (int i = 513; i < 0; i++) { - command[j] = block - - writeCOMMAND(command, 2); + //writeCOMMAND(command, 2); bool success = readSectorResponse(515); #ifdef DEBUGMODE pc.printf("\n\r DEBUG: Set sector address: %i\n\r", success);