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
Diff: spi/AferoCommHndlr.h
- Revision:
- 0:20bce0dcc921
- Child:
- 1:b2a9a6f2c30e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spi/AferoCommHndlr.h Tue Dec 20 01:51:02 2016 +0000 @@ -0,0 +1,38 @@ +#ifndef _AFERO_COMM_HNDLR_ +#define _AFERO_COMM_HNDLR_ + +#include "mbed.h" +#include "pin_defines.h" +#include "mbedSPI.h" +#include "afLib.h" +#include "debugIO.h" +#include "ToDoQ.h" + +#define ATTR_ID_SENSE_VAL 1 +#define ATTR_ID_SENSING_INTERVAL 3 + +using namespace MaruSolSensorManager; + +class AferoCommHndlr +{ +public: + void loop(); + static void init(); + static AferoCommHndlr *create(Timer *timer, mbedSPI *spi); + void update(); +private: + ToDoQ *todoQ; + uint8_t sem; + AferoCommHndlr(); + iafLib *piafLib; + static void fco_irq_fall(); + static void myOnAttributeSet(const uint8_t requestId, const uint16_t attributeId, const uint16_t valueLen, const uint8_t *value); + static void myOnAttributeSetComplete(const uint8_t requestId, const uint16_t attributeId, const uint16_t valueLen, const uint8_t *value); + static void onGetTodo(ToDo *todo); + mbedSPI *spi; + Timer *timer; + Timeout timeoutSense; + Timeout timeoutUpload; +}; + +#endif //_AFERO_COMM_HNDLR_ \ No newline at end of file