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

USBHostC270 Class Reference

USBHostC270 Class Reference

A class to communicate a C270. More...

#include <USBHostC270.h>

Inherits BaseUvc, and decodeMJPEG.

Public Member Functions

 USBHostC270 (int formatIndex=C270_MJPEG, int frameIndex=C270_160x120, uint32_t interval=_5FPS)
 Constructor.
bool connected ()
 Check if a C270 device is connected.
bool connect ()
 Try to connect to a C270 device.
int readJPEG (uint8_t *buf, int size, int timeout_ms=15 *1000)
 read jpeg image

Detailed Description

A class to communicate a C270.

Definition at line 36 of file USBHostC270.h.


Constructor & Destructor Documentation

USBHostC270 ( int  formatIndex = C270_MJPEG,
int  frameIndex = C270_160x120,
uint32_t  interval = _5FPS 
)

Constructor.

Definition at line 14 of file USBHostC270.cpp.


Member Function Documentation

bool connect (  )

Try to connect to a C270 device.

Returns:
true if connection was successful

Definition at line 41 of file USBHostC270.cpp.

bool connected (  )

Check if a C270 device is connected.

Returns:
true if a MSD device is connected

Definition at line 36 of file USBHostC270.cpp.

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

read jpeg image

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

Definition at line 131 of file USBHostC270.cpp.