teste de publish
Dependencies: DS1820 HighSpeedAnalogIn devices mbed
diversos.h@13:b9183b4bc049, 2017-10-23 (annotated)
- Committer:
- brunofgc
- Date:
- Mon Oct 23 15:35:18 2017 +0000
- Revision:
- 13:b9183b4bc049
- Parent:
- 5:7801f913384e
- Child:
- 18:1eefda1f7736
vers?o com rename de arquivo ainda gerando eventuais erros; esta vers?o j? faz bootloader pela internet sem usar memoria AHB extra
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 | 5:7801f913384e | 10 | #ifndef enderecoControladoraVirtual |
brunofgc | 13:b9183b4bc049 | 11 | #define enderecoControladoraVirtual 0 |
brunofgc | 5:7801f913384e | 12 | #endif |
brunofgc | 0:1c0a769988ee | 13 | /* |
brunofgc | 0:1c0a769988ee | 14 | // On reset, indicate a watchdog reset or a pushbutton reset on LED 4 or 3 |
brunofgc | 0:1c0a769988ee | 15 | if ((LPC_WDT->WDMOD >> 2) & 1) |
brunofgc | 0:1c0a769988ee | 16 | myled4 = 1; else myled3 = 1; |
brunofgc | 0:1c0a769988ee | 17 | */ |
brunofgc | 0:1c0a769988ee | 18 | |
brunofgc | 0:1c0a769988ee | 19 | class WatchdogTimer { |
brunofgc | 0:1c0a769988ee | 20 | public: |
brunofgc | 0:1c0a769988ee | 21 | //void WatchdogTimer(void); |
brunofgc | 0:1c0a769988ee | 22 | |
brunofgc | 0:1c0a769988ee | 23 | // Load timeout value in watchdog timer and enable |
brunofgc | 0:1c0a769988ee | 24 | void kick(float); |
brunofgc | 0:1c0a769988ee | 25 | |
brunofgc | 0:1c0a769988ee | 26 | // "kick" or "feed" the dog - reset the watchdog timer |
brunofgc | 0:1c0a769988ee | 27 | // by writing this required bit pattern |
brunofgc | 0:1c0a769988ee | 28 | void kick(); |
brunofgc | 0:1c0a769988ee | 29 | }; |
brunofgc | 0:1c0a769988ee | 30 | |
brunofgc | 0:1c0a769988ee | 31 | |
brunofgc | 0:1c0a769988ee | 32 | |
brunofgc | 0:1c0a769988ee | 33 | namespace eventosRTC{ |
brunofgc | 0:1c0a769988ee | 34 | //Variaveis |
brunofgc | 0:1c0a769988ee | 35 | extern bool segundos; |
brunofgc | 0:1c0a769988ee | 36 | extern bool minutos; |
brunofgc | 0:1c0a769988ee | 37 | //extern bool hora_completa; |
brunofgc | 0:1c0a769988ee | 38 | extern bool rotina10Segundos; |
brunofgc | 0:1c0a769988ee | 39 | extern bool rotina15Minutos; |
brunofgc | 0:1c0a769988ee | 40 | extern bool rotina1hora; |
brunofgc | 0:1c0a769988ee | 41 | extern bool rotina1segundo; |
brunofgc | 0:1c0a769988ee | 42 | |
brunofgc | 0:1c0a769988ee | 43 | //Funções |
brunofgc | 0:1c0a769988ee | 44 | } |
brunofgc | 0:1c0a769988ee | 45 | |
brunofgc | 0:1c0a769988ee | 46 | namespace diversos{ |
brunofgc | 0:1c0a769988ee | 47 | //Variaveis |
brunofgc | 0:1c0a769988ee | 48 | extern WatchdogTimer wdt; |
brunofgc | 0:1c0a769988ee | 49 | extern char msg[200]; |
brunofgc | 0:1c0a769988ee | 50 | |
brunofgc | 0:1c0a769988ee | 51 | //Funções |
brunofgc | 0:1c0a769988ee | 52 | uint32_t memAvailable(); |
brunofgc | 0:1c0a769988ee | 53 | void progressBar(uint32_t,uint32_t); |
brunofgc | 3:9598af355293 | 54 | void strReplace(char *, char *, char *); |
brunofgc | 4:13ff9c81dc10 | 55 | void processaPulsosEDs(); |
brunofgc | 0:1c0a769988ee | 56 | //double stringToFloat(char *,uint16_t); //Ponteiro pra string e max tam da string por segurança |
brunofgc | 0:1c0a769988ee | 57 | } |
brunofgc | 0:1c0a769988ee | 58 | |
brunofgc | 0:1c0a769988ee | 59 | namespace commands{ |
brunofgc | 0:1c0a769988ee | 60 | //Variaveis |
brunofgc | 0:1c0a769988ee | 61 | extern char buffer[tamBufferCommands]; |
brunofgc | 0:1c0a769988ee | 62 | |
brunofgc | 0:1c0a769988ee | 63 | //Funções |
brunofgc | 0:1c0a769988ee | 64 | void exec(uint8_t); |
brunofgc | 0:1c0a769988ee | 65 | } |
brunofgc | 0:1c0a769988ee | 66 | |
brunofgc | 0:1c0a769988ee | 67 | #endif |