teste de publish
Dependencies: DS1820 HighSpeedAnalogIn devices mbed
diversos.h
00001 #ifndef _diversos_h_ 00002 #define _diversos_h_ 00003 #include "mbed.h" 00004 #include "serialPC.h" 00005 #include "funcoesSDCard.h" 00006 #include "main.h" 00007 #include "devices.h" 00008 #define tamBufferCommands 1024 00009 #include <cstdlib> 00010 #define maxTentativasEnvioDados 5 00011 #ifndef enderecoControladoraVirtual 00012 #define enderecoControladoraVirtual 0 00013 #endif 00014 00015 /* 00016 // On reset, indicate a watchdog reset or a pushbutton reset on LED 4 or 3 00017 if ((LPC_WDT->WDMOD >> 2) & 1) 00018 myled4 = 1; else myled3 = 1; 00019 */ 00020 00021 class WatchdogTimer { 00022 public: 00023 //void WatchdogTimer(void); 00024 00025 // Load timeout value in watchdog timer and enable 00026 void kick(float); 00027 00028 // "kick" or "feed" the dog - reset the watchdog timer 00029 // by writing this required bit pattern 00030 void kick(); 00031 }; 00032 00033 00034 00035 namespace eventosRTC{ 00036 //Variaveis 00037 extern bool segundos; 00038 extern bool minutos; 00039 //extern bool hora_completa; 00040 extern bool rotina10Segundos; 00041 extern char rotinaEnvioDeDados; 00042 extern bool rotina1hora; 00043 extern bool rotina1segundo; 00044 00045 //Funções 00046 } 00047 00048 namespace diversos{ 00049 //Variaveis 00050 extern WatchdogTimer wdt; 00051 extern char msg[200]; 00052 00053 //Funções 00054 uint32_t memAvailable(); 00055 void progressBar(uint32_t,uint32_t); 00056 void strReplace(char *, char *, char *); 00057 void urldecode2(char *, const char *); 00058 void processaPulsosEDs(); 00059 //double stringToFloat(char *,uint16_t); //Ponteiro pra string e max tam da string por segurança 00060 } 00061 00062 namespace commands{ 00063 //Variaveis 00064 extern char buffer[tamBufferCommands]; 00065 00066 //Funções 00067 void exec(uint8_t); 00068 } 00069 00070 #endif
Generated on Wed Jul 13 2022 12:46:24 by 1.7.2