Official reference client implementation for Cumulocity SmartREST on u-blox C027.

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Vincent Wochnik

io/DeviceFeedback.h

Committer:
xinlei
Date:
2015-03-20
Revision:
91:423177e8a401
Parent:
71:063c45e99578
Child:
93:0acd11870c6a

File content as of revision 91:423177e8a401:

#ifndef DEVICEFEEDBACK_H
#define DEVICEFEEDBACK_H

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

class DeviceFeedback
{
public:
    DeviceFeedback();

    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;
    
    /* LED lights on the application shield, consists of three colors: Red, Blue, Green.
     * Note: value 0 means fully on for a color, 255 means off. 
    */
    DigitalOut shieldLEDRed;
    DigitalOut shieldLEDBlue;
    DigitalOut shieldLEDGreen;
    Mail<uint8_t, 16> _mail;
};

#endif