CMUcam4 Arduino Interface Library  For Firmware Versions 1.00 - 1.03
Application Programmable Interface Online Documentation
 All Classes Files Functions Variables Macros Pages
Public Member Functions
CMUcom4 Class Reference

This is a hardware abstraction layer for the CMUcam4 class. More...

#include <CMUcom4.h>

List of all members.

Public Member Functions

 CMUcom4 ()
 Initialize the CMUcom4 object to use the default Serial port.
 CMUcom4 (int port)
 Initialize the CMUcom4 object to use the port Serial port.
void begin (unsigned long baud)
 Arduino Serial.begin() wrapper.
void end ()
 Arduino Serial.end() wrapper.
int read ()
 Arduino Serial.read() wrapper.
size_t write (const uint8_t *buffer, size_t size)
 Arduino Serial.write() wrapper.
size_t write (const char *str)
 Arduino Serial.write() wrapper.
size_t write (uint8_t c)
 Arduino Serial.write() wrapper.
int available ()
 Arduino Serial.available() wrapper.
void flush ()
 Arduino Serial.flush() wrapper.
int peek ()
 Arduino Serial.peek() wrapper.
void delayMilliseconds (unsigned long ms)
 Arduino delay() wrapper.
unsigned long milliseconds ()
 Arduino millis() wrapper.

Detailed Description

This is a hardware abstraction layer for the CMUcam4 class.

The CMUcom4 class targets the Ardunio prototyping platform by default.

Definition at line 159 of file CMUcom4.h.


Constructor & Destructor Documentation

CMUcom4 ( int  port)

Initialize the CMUcom4 object to use the port Serial port.

Parameters:
[in]portThe port.
See also:
CMUCOM4_SERIAL
CMUCOM4_SERIAL1
CMUCOM4_SERIAL2
CMUCOM4_SERIAL3

Definition at line 31 of file CMUcom4.cpp.


Member Function Documentation

void begin ( unsigned long  baud)

Arduino Serial.begin() wrapper.

Parameters:
[in]baudIn bits per second.
See also:
http://arduino.cc/en/Serial/Begin

Definition at line 40 of file CMUcom4.cpp.

void end ( )

Arduino Serial.end() wrapper.

See also:
http://arduino.cc/en/Serial/End

Definition at line 58 of file CMUcom4.cpp.

int read ( )

Arduino Serial.read() wrapper.

Returns:
The first byte of incoming serial data.
See also:
http://arduino.cc/en/Serial/Read

Definition at line 76 of file CMUcom4.cpp.

size_t write ( const uint8_t *  buffer,
size_t  size 
)

Arduino Serial.write() wrapper.

Parameters:
[in]bufferAn array to send as a series of bytes.
[in]sizeThe size of the buffer.
Returns:
The number of bytes written.
See also:
http://arduino.cc/en/Serial/Write

Definition at line 127 of file CMUcom4.cpp.

size_t write ( const char *  str)

Arduino Serial.write() wrapper.

Parameters:
[in]strA string to send as a series of bytes.
Returns:
The number of bytes written.
See also:
http://arduino.cc/en/Serial/Write

Definition at line 110 of file CMUcom4.cpp.

size_t write ( uint8_t  c)

Arduino Serial.write() wrapper.

Parameters:
[in]cA character to send as a single byte.
Returns:
The number of bytes written.
See also:
http://arduino.cc/en/Serial/Write

Definition at line 93 of file CMUcom4.cpp.

int available ( )

Arduino Serial.available() wrapper.

Returns:
The number of bytes available to be read.
See also:
http://arduino.cc/en/Serial/Available

Definition at line 144 of file CMUcom4.cpp.

void flush ( )

Arduino Serial.flush() wrapper.

See also:
http://arduino.cc/en/Serial/Flush

Definition at line 161 of file CMUcom4.cpp.

int peek ( )

Arduino Serial.peek() wrapper.

Returns:
The first byte of incoming serial data available.
See also:
http://arduino.cc/en/Serial/Peek

Definition at line 178 of file CMUcom4.cpp.

void delayMilliseconds ( unsigned long  ms)

Arduino delay() wrapper.

Parameters:
[in]msThe number of milliseconds to pause for.
See also:
http://arduino.cc/en/Reference/Delay

Definition at line 195 of file CMUcom4.cpp.

unsigned long milliseconds ( )

Arduino millis() wrapper.

Returns:
Number of milliseconds since the program started.
See also:
http://arduino.cc/en/Reference/Millis

Definition at line 200 of file CMUcom4.cpp.


The documentation for this class was generated from the following files: