teste de publish

Dependencies:   DS1820 HighSpeedAnalogIn devices mbed

diversos.h

Committer:
brunofgc
Date:
2017-06-02
Revision:
4:13ff9c81dc10
Parent:
3:9598af355293
Child:
5:7801f913384e

File content as of revision 4:13ff9c81dc10:

#ifndef _diversos_h_
#define _diversos_h_
#include "mbed.h"
#include "serialPC.h"
#include "funcoesSDCard.h"
#include "main.h"
#include "devices.h"
#define tamBufferCommands 1024
#include <cstdlib>

/*
// On reset, indicate a watchdog reset or a pushbutton reset on LED 4 or 3
if ((LPC_WDT->WDMOD >> 2) & 1)
        myled4 = 1; else myled3 = 1;
*/

class WatchdogTimer {
public:
    //void WatchdogTimer(void);

    // Load timeout value in watchdog timer and enable
    void kick(float);

    // "kick" or "feed" the dog - reset the watchdog timer
    // by writing this required bit pattern
    void kick();
};



namespace eventosRTC{
    //Variaveis
    extern bool segundos;
    extern bool minutos; 
    //extern bool hora_completa;   
    extern bool rotina10Segundos;
    extern bool rotina15Minutos;
    extern bool rotina1hora;
    extern bool rotina1segundo;  
    
    //Funções
}

namespace diversos{        
    //Variaveis
    extern WatchdogTimer wdt;
    extern char msg[200];    
    
    //Funções
    uint32_t memAvailable();
    void progressBar(uint32_t,uint32_t);
    void strReplace(char *, char *, char *);
    void processaPulsosEDs();
    //double stringToFloat(char *,uint16_t); //Ponteiro pra string e max tam da string por segurança
}

namespace commands{
    //Variaveis
    extern char buffer[tamBufferCommands];
    
    //Funções
    void exec(uint8_t);
}

#endif