diff options
| author | Nick Van Doorn <vandoorn.nick@gmail.com> | 2017-11-03 10:22:08 -0700 |
|---|---|---|
| committer | Nick Van Doorn <vandoorn.nick@gmail.com> | 2017-11-03 10:22:08 -0700 |
| commit | d9cc2c8146a3ef62e33da0ba5bff6e78acc446dd (patch) | |
| tree | 1e06a7cab8ec0c04b839d31499305bb169f5ba3a /camera.h | |
| parent | 5a03ac2d414ee089958ba33bea586407acba4760 (diff) | |
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.
Diffstat (limited to 'camera.h')
| -rw-r--r-- | camera.h | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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); |
