Prometheus / Pixy

Dependents:   PixyTest PixyTest

Committer:
ZHAW_Prometheus
Date:
Wed May 17 07:37:43 2017 +0000
Revision:
2:c3a866b20784
Parent:
0:a2603d7fa0ac
Vers. 17.05.2017

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ZHAW_Prometheus 2:c3a866b20784 1 #ifndef PIXYLINK_H
ZHAW_Prometheus 2:c3a866b20784 2 #define 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 protected:
ZHAW_Prometheus 0:a2603d7fa0ac 18 uint8_t m_addr;
ZHAW_Prometheus 0:a2603d7fa0ac 19 };
ZHAW_Prometheus 0:a2603d7fa0ac 20
ZHAW_Prometheus 2:c3a866b20784 21 #endif //PIXYLINK_H