pwm period is now 200us instead of the default 20ms veml6040 config is now AF_BIT | TRIG_BIT

Dependencies:   mbed MMA8451Q USBDevice WakeUp vt100

Fork of afero_node_suntory_2017_06_15 by Orefatoi

sensors/ToDoQ.h

Committer:
wataloh
Date:
2016-12-20
Revision:
0:20bce0dcc921
Child:
1:b2a9a6f2c30e

File content as of revision 0:20bce0dcc921:

#ifndef _TODO_QUEUE_H_
#define _TODO_QUEUE_H_

#include "mbed.h"
#include "debugIO.h"

#define TODO_QUEUE_SIZE 10

namespace MaruSolSensorManager
{
    class ToDo;
    class ToDoQ
    {
    public:
        typedef void (*onGetTodo)(ToDo*);
        static ToDoQ* create(onGetTodo);
        void loop();
        static void queuePut(ToDo*);
    private:
        ToDo *q[TODO_QUEUE_SIZE];
        onGetTodo _onGetTodo;
        ToDoQ(onGetTodo);
        void _queuePut(ToDo*);
    };
    class ToDo
    {
    public:
        virtual void toJSON(char *buf) = 0;
        virtual void getBytes(uint8_t *buf) = 0;
    };
    class DeviceCommonParameters
    {
    public:
        const char *devType;
        const char *partNum;
        const char *unit;
        uint32_t sensingInterval;
        DeviceCommonParameters(char *devType, char *partNum, char *unit, uint32_t sensingInterval)
        {
            this->devType = devType;
            this->partNum = partNum;
            this->unit = unit;
            this->sensingInterval = sensingInterval;
        }
    };
};


#endif //_TODO_QUEUE_H_