src/VirtualShield.cpp
/// <summary>
/// Begins the specified bit rate.
/// </summary>
/// <param name="bitRate">The bit rate to use for the virtual shield serial connection.</param>

Begins the specified bit rate.

The bit rate to use for the virtual shield serial connection.
Begins the specified bit rate . The bit rate to use for the virtual shield serial connection .
void VirtualShield::begin(long bitRate)
{
	_VShieldSerial = &VIRTUAL_SERIAL_PORT1;
#if defined(ARDUINO) && ARDUINO >= 100
    reinterpret_cast<HardwareSerial *>(_VShieldSerial)->begin(bitRate);
#else
    _VShieldSerial->begin(static_cast<uint32_t>(bitRate), SerialConfig::SERIAL_8N1);
#endif
    delay(500);
    sendStart();
	if (this->onConnect)
	{
		this->onConnect(&recentEvent);
	}
	if (this->onRefresh)
	{
		this->onRefresh(&recentEvent);
	}
}
void VirtualShield :: begin ( long bitRate ) { _VShieldSerial = & VIRTUAL_SERIAL_PORT1 ; #if defined ( ARDUINO ) && ARDUINO >= 100 reinterpret_cast < HardwareSerial * > ( _VShieldSerial ) -> begin ( bitRate ) ; #else _VShieldSerial -> begin ( static_cast < uint32_t > ( bitRate ) , SerialConfig :: SERIAL_8N1 ) ; #endif delay ( 500 ) ; sendStart ( ) ; if ( this -> onConnect ) { this -> onConnect ( & recentEvent ) ; } if ( this -> onRefresh ) { this -> onRefresh ( & recentEvent ) ; } }
<summary>
Begins the specified bit rate.
<summary > Begins the specified bit rate .