teste de publish

Dependencies:   DS1820 HighSpeedAnalogIn devices mbed

Committer:
brunofgc
Date:
Fri Jun 08 22:14:21 2018 +0000
Revision:
38:07d3907b74e5
Parent:
14:c0162ab2a951
teste de publish para compilar no mbed-cli

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 10:263c093f8977 17 extern arquivoSD bank0;
brunofgc 10:263c093f8977 18 extern arquivoSD bank1;
brunofgc 10:263c093f8977 19 extern arquivoSD currentBankFile;
brunofgc 0:1c0a769988ee 20 extern arquivoSD config;
brunofgc 0:1c0a769988ee 21 extern arquivoSD devices;
brunofgc 0:1c0a769988ee 22 extern arquivoSD status;
brunofgc 0:1c0a769988ee 23 extern arquivoSD tempFile;
brunofgc 13:b9183b4bc049 24 extern arquivoSD newFirmware;
brunofgc 13:b9183b4bc049 25 extern uint32_t nBytesArquivoRecebidos;
brunofgc 7:ae9c47f62946 26 extern bool arquivosAbertos;
brunofgc 0:1c0a769988ee 27 extern bool deleteSentFiles;
brunofgc 0:1c0a769988ee 28 extern char nomeArquivoEmRecebimento[30];
brunofgc 10:263c093f8977 29 extern uint8_t currentBank;
brunofgc 11:631bea162800 30 extern uint8_t currentBankSending;
brunofgc 14:c0162ab2a951 31 extern uint16_t checkSum;
brunofgc 13:b9183b4bc049 32
brunofgc 0:1c0a769988ee 33
brunofgc 0:1c0a769988ee 34 int init();
brunofgc 0:1c0a769988ee 35 uint8_t file_rename(const char *, const char *);
brunofgc 0:1c0a769988ee 36 int preparaEnvio(void);
brunofgc 0:1c0a769988ee 37 void finalizaEnvio(void);
brunofgc 0:1c0a769988ee 38 bool getFileTam(arquivoSD *);
brunofgc 0:1c0a769988ee 39 bool abreArquivo(arquivoSD *,char *); //Struct do arquivo e modo ('w','r+',etc)
brunofgc 0:1c0a769988ee 40 bool insereDadosArquivo(arquivoSD *, char*,uint16_t);//Struct do arquivo, dados a inserir e tamanho deles
brunofgc 13:b9183b4bc049 41 bool insereDadosArquivoHex(arquivoSD *, char*,uint16_t);//Struct do arquivo, dados a inserir e tamanho deles
brunofgc 10:263c093f8977 42 bool insereDadosBank(char*,uint16_t); //Dados a inserir e tamanho deles
brunofgc 7:ae9c47f62946 43 //bool insereDadosArquivoPeloNome(char *, char*,uint16_t);//nome do arquivo, dados a inserir e tamanho deles
brunofgc 0:1c0a769988ee 44 bool fechaArquivo(arquivoSD *); //Struct do arquivo
brunofgc 0:1c0a769988ee 45 bool exibeArquivo(arquivoSD *);
brunofgc 0:1c0a769988ee 46 bool excluiArquivo(arquivoSD *);
brunofgc 7:ae9c47f62946 47 bool arquivoAberto(uint16_t);
brunofgc 0:1c0a769988ee 48 uint16_t calcCheckSum16BITFile(char *);
brunofgc 11:631bea162800 49 void verificaCurrentBank(void); //Verifica o banco atualmente utilizado
brunofgc 11:631bea162800 50 uint8_t modificaCurrentBank(uint8_t,uint8_t);
brunofgc 10:263c093f8977 51 bool deleteBanks(uint8_t);
brunofgc 0:1c0a769988ee 52 }
brunofgc 0:1c0a769988ee 53 #endif