SLAU358Q September 2011 – October 2019
The target device must be opened first if not open yet (see MSPGANG_Interactive_Open_Target_Device, Section 4.2.12).
MSPGANG_Interactive_DefReadTargets reads the contents of the selected target devices (one to eight targets) simultaneously from Start_addr to the End_addr and saves it in the internal data buffer (see DATA_BUFFERS dat; structure for details).
Syntax
LONG MSPGANG_Interactive_DefReadTargets(BYTE mask, BYTE bar_min, BYTE bar_max, LONG Start_addr, LONG End_addr)
Arguments
BYTE mask | Mask of the target devices that data should be read from |
BYTE bar_min | Beginning progress bar value displayed on the LCD display (valid values are 0 to 100). |
BYTE bar_max | Ending —,,,--- |
LONG Start_addr | Data read from Start_addr location |
LONG End_addr | Data read up to the End_addr location |
Result
LONG | Error code |
Example
Get data from the info memory for the F2xx from each 8 target devices
DATA_BUFFERS *DBuf;
void *temp;
MSPGANG_GetDataBuffers_ptr((&temp));
DBuf = (DATA_BUFFERS *)temp;
long baddr, MCU_addr;
.................
//read data from all targets and save it in the internal DATA_BUFFERS
MSPGANG_Interactive_DefReadTargets( 0xFF, 0, 100, 0x10C0, 0x10FF);
//get the base address of data in the DATA_BUFFERS
baddr = MSPGANG_Convert_Address( MCU_TO_DATABUF, 0x10C0 );
if( baddr >= 0 )
.........
//data at the MCU_addr 0x10C0 to 0x10FF), target -> 1..8
data = DBuf->GangRx[ baddr + (MCU_addr-0x10C0)][target-1];
//get data for each target from internal buffer
.........