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-24
Revision:
2:dfe671e31221
Parent:
1:b2a9a6f2c30e
Child:
5:9d5c7ee80f3b

File content as of revision 2:dfe671e31221:

#ifndef _TODO_QUEUE_H_
#define _TODO_QUEUE_H_

#include "mbed.h"
#include "debugIO.h"
#include "CommonTemplateRoutines.hpp"
#include "Preferences.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;
        virtual void toBASE64(char *buf, PREFERENCES::_crc32 *crc32)
        {
        }
    };
}
#endif //_TODO_QUEUE_H_