EasyVR Library  1.2
Public Member Functions
EasyVRBridge Class Reference

Public Member Functions

bool check ()
 
bool checkEEPROM ()
 
void loop (uint8_t a_rx, uint8_t a_tx, uint8_t b_rx, uint8_t b_tx)
 

Detailed Description

An implementation of a software bridge between two series of Rx/Tx pins, that enables routing of the hardware serial port (connected to the PC) to digital I/O pins used as a software serial port (connected to the EasyVR).

Member Function Documentation

bool check ( )

Tests if bridge mode has been requested

Return values
istrue if bridge mode should be started
Note
The EasyVR Commander software can request bridge mode using the Serial port. This method does not require to reserve EEPROM locations.
bool checkEEPROM ( )

Tests if bridge mode has been requested (legacy method)

Return values
istrue if bridge mode should be started
Note
The first two EEPROM locations (bytes 0-1) are used for discovery and request of bridge mode from the EasyVR Commander software. Do not use the same locations for other programa data.
void loop ( uint8_t  a_rx,
uint8_t  a_tx,
uint8_t  b_rx,
uint8_t  b_tx 
)

Performs bridge mode between port A and B in an endless loop

Parameters
a_rxis the Rx pin of port A
a_txis the Tx pin of port A
b_rxis the Rx pin of port B
b_txis the Tx pin of port B
Note
Bridge mode internally connects Rx:A to Tx:B and Rx:B to Tx:A. This is done by reading from a pin and writing to the other in a fast loop, that runs until the microcontroller is reset.