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
sensors/ToDoQ.h@5:9d5c7ee80f3b, 2017-02-28 (annotated)
- Committer:
- wataloh
- Date:
- Tue Feb 28 02:09:06 2017 +0000
- Revision:
- 5:9d5c7ee80f3b
- Parent:
- 2:dfe671e31221
- Child:
- 14:b205267fa5f6
added watchdog timer for kl25z.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wataloh | 0:20bce0dcc921 | 1 | #ifndef _TODO_QUEUE_H_ |
wataloh | 0:20bce0dcc921 | 2 | #define _TODO_QUEUE_H_ |
wataloh | 0:20bce0dcc921 | 3 | |
wataloh | 0:20bce0dcc921 | 4 | #include "mbed.h" |
wataloh | 1:b2a9a6f2c30e | 5 | #include "CommonTemplateRoutines.hpp" |
wataloh | 2:dfe671e31221 | 6 | #include "Preferences.hpp" |
wataloh | 0:20bce0dcc921 | 7 | |
wataloh | 0:20bce0dcc921 | 8 | #define TODO_QUEUE_SIZE 10 |
wataloh | 0:20bce0dcc921 | 9 | |
wataloh | 0:20bce0dcc921 | 10 | namespace MaruSolSensorManager |
wataloh | 0:20bce0dcc921 | 11 | { |
wataloh | 0:20bce0dcc921 | 12 | class ToDo; |
wataloh | 1:b2a9a6f2c30e | 13 | |
wataloh | 0:20bce0dcc921 | 14 | class ToDoQ |
wataloh | 0:20bce0dcc921 | 15 | { |
wataloh | 0:20bce0dcc921 | 16 | public: |
wataloh | 0:20bce0dcc921 | 17 | typedef void (*onGetTodo)(ToDo*); |
wataloh | 0:20bce0dcc921 | 18 | static ToDoQ* create(onGetTodo); |
wataloh | 0:20bce0dcc921 | 19 | void loop(); |
wataloh | 0:20bce0dcc921 | 20 | static void queuePut(ToDo*); |
wataloh | 0:20bce0dcc921 | 21 | private: |
wataloh | 0:20bce0dcc921 | 22 | ToDo *q[TODO_QUEUE_SIZE]; |
wataloh | 0:20bce0dcc921 | 23 | onGetTodo _onGetTodo; |
wataloh | 1:b2a9a6f2c30e | 24 | DECL_GET_INSTANCE(ToDoQ); |
wataloh | 1:b2a9a6f2c30e | 25 | DECL_SELF(ToDoQ); |
wataloh | 1:b2a9a6f2c30e | 26 | void setOnToDo(onGetTodo); |
wataloh | 0:20bce0dcc921 | 27 | void _queuePut(ToDo*); |
wataloh | 1:b2a9a6f2c30e | 28 | ToDoQ(); |
wataloh | 0:20bce0dcc921 | 29 | }; |
wataloh | 1:b2a9a6f2c30e | 30 | |
wataloh | 0:20bce0dcc921 | 31 | class ToDo |
wataloh | 0:20bce0dcc921 | 32 | { |
wataloh | 0:20bce0dcc921 | 33 | public: |
wataloh | 0:20bce0dcc921 | 34 | virtual void toJSON(char *buf) = 0; |
wataloh | 0:20bce0dcc921 | 35 | virtual void getBytes(uint8_t *buf) = 0; |
wataloh | 2:dfe671e31221 | 36 | virtual void toBASE64(char *buf, PREFERENCES::_crc32 *crc32) |
wataloh | 2:dfe671e31221 | 37 | { |
wataloh | 2:dfe671e31221 | 38 | } |
wataloh | 0:20bce0dcc921 | 39 | }; |
wataloh | 1:b2a9a6f2c30e | 40 | } |
wataloh | 0:20bce0dcc921 | 41 | #endif //_TODO_QUEUE_H_ |