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:
2017-01-19
Revision:
1:b2a9a6f2c30e
Parent:
0:20bce0dcc921
Child:
2:dfe671e31221

File content as of revision 1:b2a9a6f2c30e:

#ifndef _TODO_QUEUE_H_
#define _TODO_QUEUE_H_

#include "mbed.h"
#include "debugIO.h"
#include "CommonTemplateRoutines.hpp"

#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;
        DECL_GET_INSTANCE(ToDoQ);
        DECL_SELF(ToDoQ);
        void setOnToDo(onGetTodo);
        void _queuePut(ToDo*);
        ToDoQ();
    };

    class ToDo
    {
    public:
        virtual void toJSON(char *buf) = 0;
        virtual void getBytes(uint8_t *buf) = 0;
    };
}
#endif //_TODO_QUEUE_H_