From d9cc2c8146a3ef62e33da0ba5bff6e78acc446dd Mon Sep 17 00:00:00 2001 From: Nick Van Doorn Date: Fri, 3 Nov 2017 10:22:08 -0700 Subject: Implement all methods suported on the VC0706 Most of this is ported directly from the Adafruit repo with some small changes Still lots of magic numbers floating around that I would like to squash but I'm not sure if there is really any point. --- camera.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'camera.h') diff --git a/camera.h b/camera.h index f0e0595..6fbb3cc 100644 --- a/camera.h +++ b/camera.h @@ -54,33 +54,33 @@ typedef struct { uint16_t frameptr; } Camera; -void delay (unsigned int secs); +void delay (unsigned int msecs); int openCameraFd (); void sendCommand (Camera *cam, byte cmd, byte args[]); bool runCommand (Camera *cam, byte cmd, byte args[], int respLen); -int readResponse (Camera *cam, int nBytes, int timeout); +int readResponse (Camera *cam, int nBytes, unsigned int timeout); bool verifyResponse (Camera *cam, byte cmd); bool cameraFrameBuffCtrl (Camera *cam, byte cmd); bool takePicture (Camera *cam); -size_t bufferToFile (Camera *cam, char *path); bool reset (Camera *cam); bool TVon (Camera *cam); bool TVOff (Camera *cam); -byte *readPicture (Camera *cam); +byte *readPicture (Camera *cam, byte n); bool resumeVideo (Camera *cam); uint32_t frameLength (Camera *cam); char *getVersion (Camera *cam); byte available (Camera *cam); byte getDownsize (Camera *cam); -bool setDownsize(Camera *cam, int newSize); +bool setDownsize(Camera *cam, byte newSize); int getImageSize (Camera *cam); -bool setImageSize (Camera *cam, int size); +bool setImageSize (Camera *cam, byte x); bool getMotionDetect (Camera *cam); byte getMotionStatus(Camera *cam, byte x); bool motionDetected (Camera *cam); -bool setMotionDetect (bool flag); -bool setMotionStatus (byte x, byte d1, byte d2); +bool setMotionDetect (Camera *cam, bool flag); +bool setMotionStatus (Camera *cam, byte x, byte d1, byte d2); byte getCompression (Camera *cam); bool setCompression(Camera *cam, byte c); bool getPTZ(Camera *cam, uint16_t *w, uint16_t *h, uint16_t *wz, uint16_t *hz, uint16_t *pan, uint16_t *tilt); bool setPTZ(Camera *cam, uint16_t wz, uint16_t hz, uint16_t pan, uint16_t tilt); +size_t camToFile (Camera *cam, char *path); -- cgit v1.2.3