-
Notifications
You must be signed in to change notification settings - Fork 3
/
AP_PIXY_SPI.h
64 lines (47 loc) · 1.04 KB
/
AP_PIXY_SPI.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* AP_PIXY_SPI.h - Library for the CMUcam5 PIXY
*
* code by Antoine LECESTRE for DIYdrones.com
* based on the arduino's TPixy.h and Pixy.h library form CMUCAM PIXY project
*
* sensor should be connected to the SPI port
*
*
*/
/* /////////////////////////////////////////////////////////////////////////////////////////
*
* This is not yet implemented !
*
*/////////////////////////////////////////////////////////////////////////////////////////
#ifndef _PIXY_SPI_H
#define _PIXY_SPI_H
#include <AP_HAL.h>
extern const AP_HAL::HAL& hal;
#include <AP_PIXY.h>
#include <AP_PIXY.cpp>
class LinkSPI
{
public:
// init - simply sets the SPI address
void init(uint8_t address)
{
}
// get a Word from PIXY
uint16_t getWord()
{
}
// get a byte from PIXY
uint8_t getByte()
{
}
// send health status
bool health()
{
return PIXY_SPI_is_healthy;
}
private:
// health
bool PIXY_SPI_is_healthy;
};
typedef AP_PIXY<LinkSPI> AP_PIXY_SPI;
#endif // _PIXY_SPI_H