no error msgs
Fork of pixy by
PixyLink.h@0:ed8dc4531ac1, 2014-11-16 (annotated)
- Committer:
- acracan
- Date:
- Sun Nov 16 11:52:55 2014 +0000
- Revision:
- 0:ed8dc4531ac1
Initial commit of ported version of the Arduino Pixy Cmucam5 library.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
acracan | 0:ed8dc4531ac1 | 1 | #ifndef TUIASI_PIXYLINK_H |
acracan | 0:ed8dc4531ac1 | 2 | #define TUIASI_PIXYLINK_H |
acracan | 0:ed8dc4531ac1 | 3 | |
acracan | 0:ed8dc4531ac1 | 4 | #include "stdint.h" |
acracan | 0:ed8dc4531ac1 | 5 | |
acracan | 0:ed8dc4531ac1 | 6 | class PixyLink |
acracan | 0:ed8dc4531ac1 | 7 | { |
acracan | 0:ed8dc4531ac1 | 8 | public: |
acracan | 0:ed8dc4531ac1 | 9 | PixyLink() { m_addr = 0; }; |
acracan | 0:ed8dc4531ac1 | 10 | PixyLink(uint8_t addr) : m_addr(addr) {}; |
acracan | 0:ed8dc4531ac1 | 11 | void setAddress(uint8_t addr) { |
acracan | 0:ed8dc4531ac1 | 12 | m_addr = addr; |
acracan | 0:ed8dc4531ac1 | 13 | }; |
acracan | 0:ed8dc4531ac1 | 14 | virtual uint16_t getWord() = 0; |
acracan | 0:ed8dc4531ac1 | 15 | virtual uint8_t getByte() = 0; |
acracan | 0:ed8dc4531ac1 | 16 | virtual int8_t send(uint8_t *data, uint8_t len) = 0; |
acracan | 0:ed8dc4531ac1 | 17 | protected: |
acracan | 0:ed8dc4531ac1 | 18 | uint8_t m_addr; |
acracan | 0:ed8dc4531ac1 | 19 | }; |
acracan | 0:ed8dc4531ac1 | 20 | |
acracan | 0:ed8dc4531ac1 | 21 | #endif //TUIASI_PIXYLINK_H |