APP2 - SNE CODE / Mbed 2 deprecated Exercice_3V1

Dependencies:   mbed

bp.h

Committer:
Kurogami
Date:
2019-03-01
Revision:
0:ac12fb337ed8

File content as of revision 0:ac12fb337ed8:

#ifndef BP_H
#define BP_H

#include <DigitalIn.h>
#include <Timer.h>

namespace smartled
{
typedef enum {init,under50ms,shortPush,longPush} bpEtat;

class bp : public mbed::DigitalIn
{
public:
    bp(PinName name,std::size_t * click_cpt);
    
    void run(void);
    
    bool getIsOnOff_On(void);
    
    void operator ()(void);
    
private:
    std::size_t * m_click_cpt;
    bool m_isOnOff_On;
    mbed::Timer m_timer;
};

}
#endif //BP_H