no error msgs
Fork of pixy by
PixyLink.h@1:198f26635a24, 2015-12-10 (annotated)
- Committer:
- jfields
- Date:
- Thu Dec 10 02:41:05 2015 +0000
- Revision:
- 1:198f26635a24
- Parent:
- 0:ed8dc4531ac1
abc
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 |