Senior Design Stuff
Fork of pixy by
PixyLink.h@2:8bbb50d09c95, 2015-04-19 (annotated)
- Committer:
- shurjo_1234
- Date:
- Sun Apr 19 09:54:17 2015 +0000
- Revision:
- 2:8bbb50d09c95
- Parent:
- 0:ed8dc4531ac1
Justin sucks
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 |