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
spi/AferoCommHndlr.h
- Committer:
- wataloh
- Date:
- 2017-01-19
- Revision:
- 1:b2a9a6f2c30e
- Parent:
- 0:20bce0dcc921
- Child:
- 2:dfe671e31221
File content as of revision 1:b2a9a6f2c30e:
#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_FLOW_CONTROL 4 #define ATTR_ID_SENSING_INTERVAL 3 using namespace MaruSolSensorManager; class Necochan { DigitalOut *out; Timeout timeout; static Necochan *ref; public: Necochan(); static void release(); void push(); }; class AferoCommHndlr { public: void loop(); static void init(); static AferoCommHndlr *create(Timer *timer, mbedSPI *spi); void update(); private: bool flowControlEnabled; //ATTR_ID_FLOW_CONTROL; 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; Necochan *necochan; }; #endif //_AFERO_COMM_HNDLR_