Own fork of MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

io/DeviceFeedback.h

Committer:
vwochnik
Date:
2014-11-30
Revision:
67:c360a2b2c948
Parent:
65:a62dbef2f924
Child:
71:063c45e99578

File content as of revision 67:c360a2b2c948:

#ifndef DEVICEFEEDBACK_H
#define DEVICEFEEDBACK_H

#include <stddef.h>
#include "mbed.h"
#include "rtos.h"

class DeviceFeedback
{
public:
    DeviceFeedback(PwmOut speaker);
    
    void beepSuccess();
    void beepFailure();
    void closeRelay();
    void openRelay();
    
protected:
    void sendMessage(uint8_t);
    void thread();
    static void thread_func(void const*);

private:
    PwmOut _speaker;
    Thread _thread;
    Mail<uint8_t, 16> _mail;
};

#endif