-
Notifications
You must be signed in to change notification settings - Fork 0
/
Camera.hpp
50 lines (40 loc) · 949 Bytes
/
Camera.hpp
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
/*
* FILENAME: Camera.hpp
* AUTHOR: Josh Trzebiatowski <[email protected]>
* DATE: April 10, 2015
*/
#ifndef CAMERA_HPP_
#define CAMERA_HPP_
#include "I2C.hpp"
/*
* Camera class definition
* Reads camera information and communicates via I2C
*/
class Camera {
private:
I2C* i2c;
protected:
public:
/*
* Constructor, initializes pointers and I2C component
*/
Camera();
/*
* Get one frame and print it to the VGA memory
* Parameter debug toggles printing of I2C debug information
*/
unsigned char getFrame(bool debug);
/*
* Get a pointer to the pixel data at a specified location
*/
volatile unsigned char* pixel(int row, int column);
/*
* write data to the camera register specified by subaddr
*/
void camWrite(unsigned char subaddr,unsigned char data);
/*
* read data from the camera register specified by subaddr
*/
unsigned char camRead(unsigned char subaddr);
};
#endif /* CAMERA_HPP_ */