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@0:20bce0dcc921, 2016-12-20 (annotated)
- Committer:
- wataloh
- Date:
- Tue Dec 20 01:51:02 2016 +0000
- Revision:
- 0:20bce0dcc921
- Child:
- 1:b2a9a6f2c30e
kl25z teensy merged
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 | 0:20bce0dcc921 | 5 | #include "debugIO.h" |
wataloh | 0:20bce0dcc921 | 6 | |
wataloh | 0:20bce0dcc921 | 7 | #define TODO_QUEUE_SIZE 10 |
wataloh | 0:20bce0dcc921 | 8 | |
wataloh | 0:20bce0dcc921 | 9 | namespace MaruSolSensorManager |
wataloh | 0:20bce0dcc921 | 10 | { |
wataloh | 0:20bce0dcc921 | 11 | class ToDo; |
wataloh | 0:20bce0dcc921 | 12 | class ToDoQ |
wataloh | 0:20bce0dcc921 | 13 | { |
wataloh | 0:20bce0dcc921 | 14 | public: |
wataloh | 0:20bce0dcc921 | 15 | typedef void (*onGetTodo)(ToDo*); |
wataloh | 0:20bce0dcc921 | 16 | static ToDoQ* create(onGetTodo); |
wataloh | 0:20bce0dcc921 | 17 | void loop(); |
wataloh | 0:20bce0dcc921 | 18 | static void queuePut(ToDo*); |
wataloh | 0:20bce0dcc921 | 19 | private: |
wataloh | 0:20bce0dcc921 | 20 | ToDo *q[TODO_QUEUE_SIZE]; |
wataloh | 0:20bce0dcc921 | 21 | onGetTodo _onGetTodo; |
wataloh | 0:20bce0dcc921 | 22 | ToDoQ(onGetTodo); |
wataloh | 0:20bce0dcc921 | 23 | void _queuePut(ToDo*); |
wataloh | 0:20bce0dcc921 | 24 | }; |
wataloh | 0:20bce0dcc921 | 25 | class ToDo |
wataloh | 0:20bce0dcc921 | 26 | { |
wataloh | 0:20bce0dcc921 | 27 | public: |
wataloh | 0:20bce0dcc921 | 28 | virtual void toJSON(char *buf) = 0; |
wataloh | 0:20bce0dcc921 | 29 | virtual void getBytes(uint8_t *buf) = 0; |
wataloh | 0:20bce0dcc921 | 30 | }; |
wataloh | 0:20bce0dcc921 | 31 | class DeviceCommonParameters |
wataloh | 0:20bce0dcc921 | 32 | { |
wataloh | 0:20bce0dcc921 | 33 | public: |
wataloh | 0:20bce0dcc921 | 34 | const char *devType; |
wataloh | 0:20bce0dcc921 | 35 | const char *partNum; |
wataloh | 0:20bce0dcc921 | 36 | const char *unit; |
wataloh | 0:20bce0dcc921 | 37 | uint32_t sensingInterval; |
wataloh | 0:20bce0dcc921 | 38 | DeviceCommonParameters(char *devType, char *partNum, char *unit, uint32_t sensingInterval) |
wataloh | 0:20bce0dcc921 | 39 | { |
wataloh | 0:20bce0dcc921 | 40 | this->devType = devType; |
wataloh | 0:20bce0dcc921 | 41 | this->partNum = partNum; |
wataloh | 0:20bce0dcc921 | 42 | this->unit = unit; |
wataloh | 0:20bce0dcc921 | 43 | this->sensingInterval = sensingInterval; |
wataloh | 0:20bce0dcc921 | 44 | } |
wataloh | 0:20bce0dcc921 | 45 | }; |
wataloh | 0:20bce0dcc921 | 46 | }; |
wataloh | 0:20bce0dcc921 | 47 | |
wataloh | 0:20bce0dcc921 | 48 | |
wataloh | 0:20bce0dcc921 | 49 | #endif //_TODO_QUEUE_H_ |