teste de publish
Dependencies: DS1820 HighSpeedAnalogIn devices mbed
Diff: funcoesSDCard.h
- Revision:
- 0:1c0a769988ee
- Child:
- 7:ae9c47f62946
diff -r 000000000000 -r 1c0a769988ee funcoesSDCard.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/funcoesSDCard.h Fri Mar 24 15:54:41 2017 +0000 @@ -0,0 +1,39 @@ +#ifndef _funcoesSDCard_h_ +#define _funcoesSDCard_h_ +#include "SDFileSystem.h" +//#include "modem.h" + + +typedef struct{ + FILE *fp; + bool aberto; + uint32_t bytes; + char nome[30]; +}arquivoSD; + +namespace sdCard{ + extern SDFileSystem sd; + extern arquivoSD envio; + extern arquivoSD armazenamento; + extern arquivoSD config; + extern arquivoSD devices; + extern arquivoSD status; + extern arquivoSD tempFile; + extern bool deleteSentFiles; + extern char nomeArquivoEmRecebimento[30]; + + int init(); + uint8_t file_rename(const char *, const char *); + int preparaEnvio(void); + void finalizaEnvio(void); + bool getFileTam(arquivoSD *); + bool abreArquivo(arquivoSD *,char *); //Struct do arquivo e modo ('w','r+',etc) + bool insereDadosArquivo(arquivoSD *, char*,uint16_t);//Struct do arquivo, dados a inserir e tamanho deles + bool insereDadosArquivoPeloNome(char *, char*,uint16_t);//nome do arquivo, dados a inserir e tamanho deles + bool fechaArquivo(arquivoSD *); //Struct do arquivo + bool exibeArquivo(arquivoSD *); + bool excluiArquivo(arquivoSD *); + bool arquivoAberto(); + uint16_t calcCheckSum16BITFile(char *); +} +#endif