teste de publish
Dependencies: DS1820 HighSpeedAnalogIn devices mbed
Diff: serialPC.cpp
- Revision:
- 22:cb832a9bc704
- Parent:
- 21:b9315cdd9275
- Child:
- 25:a6da63ed025b
--- a/serialPC.cpp Tue Feb 06 16:33:51 2018 +0000 +++ b/serialPC.cpp Tue Feb 06 22:07:10 2018 +0000 @@ -89,8 +89,23 @@ return; } + if(strstr(bufIn,"excluiArquivo:tempFile.bin")!=NULL){ + sdCard::exibeArquivo(&sdCard::tempFile); + remove("/sd/RAD/tempFile.bin"); + return; + } + /* - if(strstr(bufIn,"exibeArquivo:tempFile.bin")!=NULL){ + if(strstr(bufIn,"format c:")!=NULL){ + pc.printf("Formatando "); + if(format()){ + pc.printf("ok\r\n"); + }else{pc.printf("nok\r\n");} + return; + } + */ + + if(strstr(bufIn,"exibeArquivo:tempFile.bin")!=NULL){ sdCard::exibeArquivo(&sdCard::tempFile); return; } @@ -105,6 +120,13 @@ return; } + if(strstr(bufIn,"testeEscrita")!=NULL){ + sdCard::abreArquivo(&sdCard::tempFile,"a"); + fprintf(sdCard::tempFile.fp,"Linha escrita\r\n"); + sdCard::fechaArquivo(&sdCard::tempFile); + return; + } + if(strstr(bufIn,"exibeArquivo:currentBank.txt")!=NULL){ sdCard::exibeArquivo(&sdCard::currentBankFile); return;