teste de publish
Dependencies: DS1820 HighSpeedAnalogIn devices mbed
diversos.h@38:07d3907b74e5, 2018-06-08 (annotated)
- Committer:
- brunofgc
- Date:
- Fri Jun 08 22:14:21 2018 +0000
- Revision:
- 38:07d3907b74e5
- Parent:
- 25:a6da63ed025b
teste de publish para compilar no mbed-cli
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
brunofgc | 0:1c0a769988ee | 1 | #ifndef _diversos_h_ |
brunofgc | 0:1c0a769988ee | 2 | #define _diversos_h_ |
brunofgc | 0:1c0a769988ee | 3 | #include "mbed.h" |
brunofgc | 0:1c0a769988ee | 4 | #include "serialPC.h" |
brunofgc | 0:1c0a769988ee | 5 | #include "funcoesSDCard.h" |
brunofgc | 1:0e0967c88590 | 6 | #include "main.h" |
brunofgc | 1:0e0967c88590 | 7 | #include "devices.h" |
brunofgc | 1:0e0967c88590 | 8 | #define tamBufferCommands 1024 |
brunofgc | 0:1c0a769988ee | 9 | #include <cstdlib> |
brunofgc | 18:1eefda1f7736 | 10 | #define maxTentativasEnvioDados 5 |
brunofgc | 5:7801f913384e | 11 | #ifndef enderecoControladoraVirtual |
brunofgc | 13:b9183b4bc049 | 12 | #define enderecoControladoraVirtual 0 |
brunofgc | 5:7801f913384e | 13 | #endif |
brunofgc | 18:1eefda1f7736 | 14 | |
brunofgc | 0:1c0a769988ee | 15 | /* |
brunofgc | 0:1c0a769988ee | 16 | // On reset, indicate a watchdog reset or a pushbutton reset on LED 4 or 3 |
brunofgc | 0:1c0a769988ee | 17 | if ((LPC_WDT->WDMOD >> 2) & 1) |
brunofgc | 0:1c0a769988ee | 18 | myled4 = 1; else myled3 = 1; |
brunofgc | 0:1c0a769988ee | 19 | */ |
brunofgc | 0:1c0a769988ee | 20 | |
brunofgc | 0:1c0a769988ee | 21 | class WatchdogTimer { |
brunofgc | 0:1c0a769988ee | 22 | public: |
brunofgc | 0:1c0a769988ee | 23 | //void WatchdogTimer(void); |
brunofgc | 0:1c0a769988ee | 24 | |
brunofgc | 0:1c0a769988ee | 25 | // Load timeout value in watchdog timer and enable |
brunofgc | 0:1c0a769988ee | 26 | void kick(float); |
brunofgc | 0:1c0a769988ee | 27 | |
brunofgc | 0:1c0a769988ee | 28 | // "kick" or "feed" the dog - reset the watchdog timer |
brunofgc | 0:1c0a769988ee | 29 | // by writing this required bit pattern |
brunofgc | 0:1c0a769988ee | 30 | void kick(); |
brunofgc | 0:1c0a769988ee | 31 | }; |
brunofgc | 0:1c0a769988ee | 32 | |
brunofgc | 0:1c0a769988ee | 33 | |
brunofgc | 0:1c0a769988ee | 34 | |
brunofgc | 0:1c0a769988ee | 35 | namespace eventosRTC{ |
brunofgc | 0:1c0a769988ee | 36 | //Variaveis |
brunofgc | 0:1c0a769988ee | 37 | extern bool segundos; |
brunofgc | 0:1c0a769988ee | 38 | extern bool minutos; |
brunofgc | 0:1c0a769988ee | 39 | //extern bool hora_completa; |
brunofgc | 0:1c0a769988ee | 40 | extern bool rotina10Segundos; |
brunofgc | 18:1eefda1f7736 | 41 | extern char rotinaEnvioDeDados; |
brunofgc | 0:1c0a769988ee | 42 | extern bool rotina1hora; |
brunofgc | 0:1c0a769988ee | 43 | extern bool rotina1segundo; |
brunofgc | 0:1c0a769988ee | 44 | |
brunofgc | 0:1c0a769988ee | 45 | //Funções |
brunofgc | 0:1c0a769988ee | 46 | } |
brunofgc | 0:1c0a769988ee | 47 | |
brunofgc | 0:1c0a769988ee | 48 | namespace diversos{ |
brunofgc | 0:1c0a769988ee | 49 | //Variaveis |
brunofgc | 0:1c0a769988ee | 50 | extern WatchdogTimer wdt; |
brunofgc | 0:1c0a769988ee | 51 | extern char msg[200]; |
brunofgc | 0:1c0a769988ee | 52 | |
brunofgc | 0:1c0a769988ee | 53 | //Funções |
brunofgc | 0:1c0a769988ee | 54 | uint32_t memAvailable(); |
brunofgc | 0:1c0a769988ee | 55 | void progressBar(uint32_t,uint32_t); |
brunofgc | 3:9598af355293 | 56 | void strReplace(char *, char *, char *); |
brunofgc | 25:a6da63ed025b | 57 | void urldecode2(char *, const char *); |
brunofgc | 4:13ff9c81dc10 | 58 | void processaPulsosEDs(); |
brunofgc | 0:1c0a769988ee | 59 | //double stringToFloat(char *,uint16_t); //Ponteiro pra string e max tam da string por segurança |
brunofgc | 0:1c0a769988ee | 60 | } |
brunofgc | 0:1c0a769988ee | 61 | |
brunofgc | 0:1c0a769988ee | 62 | namespace commands{ |
brunofgc | 0:1c0a769988ee | 63 | //Variaveis |
brunofgc | 0:1c0a769988ee | 64 | extern char buffer[tamBufferCommands]; |
brunofgc | 0:1c0a769988ee | 65 | |
brunofgc | 0:1c0a769988ee | 66 | //Funções |
brunofgc | 0:1c0a769988ee | 67 | void exec(uint8_t); |
brunofgc | 0:1c0a769988ee | 68 | } |
brunofgc | 0:1c0a769988ee | 69 | |
brunofgc | 0:1c0a769988ee | 70 | #endif |