teste de publish

Dependencies:   DS1820 HighSpeedAnalogIn devices mbed

Committer:
brunofgc
Date:
Tue Jul 11 11:55:56 2017 +0000
Revision:
7:ae9c47f62946
Parent:
0:1c0a769988ee
Child:
10:263c093f8977
Vers?o UCSal piloto 1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
brunofgc 0:1c0a769988ee 1 #ifndef _funcoesSDCard_h_
brunofgc 0:1c0a769988ee 2 #define _funcoesSDCard_h_
brunofgc 0:1c0a769988ee 3 #include "SDFileSystem.h"
brunofgc 7:ae9c47f62946 4 #define timeOutArquivoAberto 10000
brunofgc 0:1c0a769988ee 5 //#include "modem.h"
brunofgc 0:1c0a769988ee 6
brunofgc 0:1c0a769988ee 7
brunofgc 0:1c0a769988ee 8 typedef struct{
brunofgc 0:1c0a769988ee 9 FILE *fp;
brunofgc 0:1c0a769988ee 10 bool aberto;
brunofgc 0:1c0a769988ee 11 uint32_t bytes;
brunofgc 0:1c0a769988ee 12 char nome[30];
brunofgc 0:1c0a769988ee 13 }arquivoSD;
brunofgc 0:1c0a769988ee 14
brunofgc 0:1c0a769988ee 15 namespace sdCard{
brunofgc 0:1c0a769988ee 16 extern SDFileSystem sd;
brunofgc 0:1c0a769988ee 17 extern arquivoSD envio;
brunofgc 0:1c0a769988ee 18 extern arquivoSD armazenamento;
brunofgc 0:1c0a769988ee 19 extern arquivoSD config;
brunofgc 0:1c0a769988ee 20 extern arquivoSD devices;
brunofgc 0:1c0a769988ee 21 extern arquivoSD status;
brunofgc 0:1c0a769988ee 22 extern arquivoSD tempFile;
brunofgc 7:ae9c47f62946 23 extern bool arquivosAbertos;
brunofgc 0:1c0a769988ee 24 extern bool deleteSentFiles;
brunofgc 0:1c0a769988ee 25 extern char nomeArquivoEmRecebimento[30];
brunofgc 0:1c0a769988ee 26
brunofgc 0:1c0a769988ee 27 int init();
brunofgc 0:1c0a769988ee 28 uint8_t file_rename(const char *, const char *);
brunofgc 0:1c0a769988ee 29 int preparaEnvio(void);
brunofgc 0:1c0a769988ee 30 void finalizaEnvio(void);
brunofgc 0:1c0a769988ee 31 bool getFileTam(arquivoSD *);
brunofgc 0:1c0a769988ee 32 bool abreArquivo(arquivoSD *,char *); //Struct do arquivo e modo ('w','r+',etc)
brunofgc 0:1c0a769988ee 33 bool insereDadosArquivo(arquivoSD *, char*,uint16_t);//Struct do arquivo, dados a inserir e tamanho deles
brunofgc 7:ae9c47f62946 34 //bool insereDadosArquivoPeloNome(char *, char*,uint16_t);//nome do arquivo, dados a inserir e tamanho deles
brunofgc 0:1c0a769988ee 35 bool fechaArquivo(arquivoSD *); //Struct do arquivo
brunofgc 0:1c0a769988ee 36 bool exibeArquivo(arquivoSD *);
brunofgc 0:1c0a769988ee 37 bool excluiArquivo(arquivoSD *);
brunofgc 7:ae9c47f62946 38 bool arquivoAberto(uint16_t);
brunofgc 0:1c0a769988ee 39 uint16_t calcCheckSum16BITFile(char *);
brunofgc 0:1c0a769988ee 40 }
brunofgc 0:1c0a769988ee 41 #endif