예제 #1
0
파일: DWire.cpp 프로젝트: DelfiSpace/DWire
void DWire::begin( uint8_t address ) 
{
    // Initialising the given module as a slave
    busRole = BUS_ROLE_SLAVE;
    slaveAddress = address;

    _initMain( );

    _initSlave( );
}
예제 #2
0
void DWire::begin(uint_fast32_t module, uint8_t address) {
	this->module = module;

	// Initialising the given module as a slave
	busRole = BUS_ROLE_SLAVE;
	slaveAddress = address;

	_initMain();

	_initSlave();
}
예제 #3
0
파일: objectCM.cpp 프로젝트: rttag/Collage
void ObjectCM::_addSlave( MasterCMCommand command, const uint128_t& version )
{
    LBASSERT( version != VERSION_NONE );
    LBASSERT( command.getType() == COMMANDTYPE_NODE );
    LBASSERT( command.getCommand() == CMD_NODE_MAP_OBJECT );

    // process request
    if( command.getRequestedVersion() == VERSION_NONE )
    {
        // no data to send, send empty version
        _sendMapSuccess( command, false /* mc */ );
        _sendEmptyVersion( command, VERSION_NONE, false /* mc */ );
        _sendMapReply( command, VERSION_NONE, true, false, false /* mc */ );

        return;
    }

    const bool replyUseCache = command.useCache() &&
                   (command.getMasterInstanceID() == _object->getInstanceID( ));
    _initSlave( command, version, replyUseCache );
}