Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
PixyLink.h@0:a2603d7fa0ac, 2017-05-05 (annotated)
- Committer:
- ZHAW_Prometheus
- Date:
- Fri May 05 12:03:13 2017 +0000
- Revision:
- 0:a2603d7fa0ac
- Child:
- 2:c3a866b20784
Vers-0.1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ZHAW_Prometheus | 0:a2603d7fa0ac | 1 | #ifndef TUIASI_PIXYLINK_H |
ZHAW_Prometheus | 0:a2603d7fa0ac | 2 | #define TUIASI_PIXYLINK_H |
ZHAW_Prometheus | 0:a2603d7fa0ac | 3 | |
ZHAW_Prometheus | 0:a2603d7fa0ac | 4 | #include "stdint.h" |
ZHAW_Prometheus | 0:a2603d7fa0ac | 5 | |
ZHAW_Prometheus | 0:a2603d7fa0ac | 6 | class PixyLink |
ZHAW_Prometheus | 0:a2603d7fa0ac | 7 | { |
ZHAW_Prometheus | 0:a2603d7fa0ac | 8 | public: |
ZHAW_Prometheus | 0:a2603d7fa0ac | 9 | PixyLink() { m_addr = 0; }; |
ZHAW_Prometheus | 0:a2603d7fa0ac | 10 | PixyLink(uint8_t addr) : m_addr(addr) {}; |
ZHAW_Prometheus | 0:a2603d7fa0ac | 11 | void setAddress(uint8_t addr) { |
ZHAW_Prometheus | 0:a2603d7fa0ac | 12 | m_addr = addr; |
ZHAW_Prometheus | 0:a2603d7fa0ac | 13 | }; |
ZHAW_Prometheus | 0:a2603d7fa0ac | 14 | virtual uint16_t getWord() = 0; |
ZHAW_Prometheus | 0:a2603d7fa0ac | 15 | virtual uint8_t getByte() = 0; |
ZHAW_Prometheus | 0:a2603d7fa0ac | 16 | virtual int8_t send(uint8_t *data, uint8_t len) = 0; |
ZHAW_Prometheus | 0:a2603d7fa0ac | 17 | |
ZHAW_Prometheus | 0:a2603d7fa0ac | 18 | protected: |
ZHAW_Prometheus | 0:a2603d7fa0ac | 19 | uint8_t m_addr; |
ZHAW_Prometheus | 0:a2603d7fa0ac | 20 | }; |
ZHAW_Prometheus | 0:a2603d7fa0ac | 21 | |
ZHAW_Prometheus | 0:a2603d7fa0ac | 22 | #endif //TUIASI_PIXYLINK_H |