Port of Arduino Pixy Cmucam5 library.

Dependents:   __cam1

Fork of pixy by Arcadie Cracan

Committer:
vermaelen
Date:
Fri Mar 23 15:47:32 2018 +0000
Revision:
1:6ab45d67f36d
Parent:
0:ed8dc4531ac1
good

Who changed what in which revision?

UserRevisionLine numberNew 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