testing n-Bed with a Logitech C270 camera

Dependencies:   USBHost mbed

Fork of USBHostC270_example by Norimasa Okamoto

Embed: (wiki syntax)

« Back to documentation index

USBHostCam Class Reference

USBHostCam Class Reference

A class to communicate a Cam. More...

#include <USBHostCam.h>

Inherits BaseUvc, and decodeMJPEG.

Public Member Functions

 USBHostCam (uint8_t size=_160x120, uint8_t option=0, CamInfo *user_caminfo=NULL)
bool connected ()
 Check if a Cam device is connected.
bool connect ()
 Try to connect to a Cam device.
int readJPEG (uint8_t *buf, int size, int timeout_ms=15 *1000)
 read jpeg image

Detailed Description

A class to communicate a Cam.

Definition at line 44 of file USBHostCam.h.

Constructor & Destructor Documentation

USBHostCam ( uint8_t  size = _160x120,
uint8_t  option = 0,
CamInfo *  user_caminfo = NULL 


Definition at line 17 of file USBHostCam.cpp.

Member Function Documentation

bool connect (  )

Try to connect to a Cam device.

true if connection was successful

Definition at line 48 of file USBHostCam.cpp.

bool connected (  )

Check if a Cam device is connected.

true if a Cam device is connected

Definition at line 43 of file USBHostCam.cpp.

int readJPEG ( uint8_t *  buf,
int  size,
int  timeout_ms = 15*1000 

read jpeg image

bufread buffer
sizebuffer size
timeout_mstimeout default 15sec
jpeg size if read success else -1

Definition at line 141 of file USBHostCam.cpp.