CanInterface Dispatcher, it depends on MyThread (MyThings lib)
CANFifoMessage.h
- Committer:
- clemounet
- Date:
- 2015-04-14
- Revision:
- 1:b9201bec01bf
- Parent:
- 0:3ca0a6d1e2a1
File content as of revision 1:b9201bec01bf:
#ifndef CAN_FIFO_MESSAGE #define CAN_FIFO_MESSAGE #include "mbed.h" #include "CAN.h" #define FIFO_SIZE 25 class CANFifoMessage { CANMessage buffer[FIFO_SIZE]; uint32_t head, tail; public: CANFifoMessage(); bool put(CANMessage data);// returns 0 on success bool get(CANMessage* data); uint32_t available(); uint32_t free(); }; #endif /* CAN_FIFO_MESSAGE */