omap3530/omap3530_drivers/spi/test/d_spi_client_m.cpp
branchBeagle_BSP_dev
changeset 83 bcf33365fd8d
parent 82 65b40f262685
child 84 09e266454dcf
equal deleted inserted replaced
82:65b40f262685 83:bcf33365fd8d
   329 		};
   329 		};
   330 
   330 
   331 	TPckgBuf<TConfigSpiV01> header(KHeader);
   331 	TPckgBuf<TConfigSpiV01> header(KHeader);
   332 
   332 
   333 	// create transfer object
   333 	// create transfer object
   334 	const TInt KBuffLength = 10; // tTODO temp ..
   334 	const TInt KBuffLength = 64;
   335 	TBuf8<KBuffLength> txTransferBuf; // txbuffer..
   335 	TBuf8<KBuffLength> txTransferBuf; // txbuffer..
   336 
   336 
   337 	// fill it with some data..(this will also set the length of the buffer)
   337 	// fill it with some data..(this will also set the length of the buffer)
   338 	for (TInt i = 0; i < KBuffLength; ++i)
   338 	for (TInt i = 0; i < KBuffLength; ++i)
   339 		{
   339 		{
   345 
   345 
   346 	// Create a transaction using header and list of transfers..
   346 	// Create a transaction using header and list of transfers..
   347 	TIicBusTransaction transaction(&header, &txTransfer);
   347 	TIicBusTransaction transaction(&header, &txTransfer);
   348 
   348 
   349 	// queue the transaction synchronously
   349 	// queue the transaction synchronously
   350 	r = IicBus::QueueTransaction(busId, &transaction);
       
   351 
       
   352 	// TODO - temporary added here..
       
   353 	SET_SLAVE_ADDR(busId, 1);
       
   354 	r = IicBus::QueueTransaction(busId, &transaction);
   350 	r = IicBus::QueueTransaction(busId, &transaction);
   355 
   351 
   356 	LOG_FUNCTION_RETURN;
   352 	LOG_FUNCTION_RETURN;
   357 	return r;
   353 	return r;
   358 	}
   354 	}