hj. I have a project with DSP C6416 is "Sending some bytes from target to host"
in Application of Targer (CCS), I use the structure following:
TARGET_INITIALIZE();
void funSWI()
{
/* data to send to host */
int status;
int j;
int size1;
int size2;
/* enable the output channel */
RTDX_enableOutput( &ochan );
/* send the data to the host */
status = RTDX_write( &ochan, &size1, sizeof(size1) );
status = RTDX_write( &ochan, &size2, sizeof(size2) );
/* check the status of the write operation */
if ( status == 0 ) {
puts("ERROR: RTDX_write failed!\n" );
exit(-1 );
}
/* disable the channel after use */
RTDX_disableOutput( &ochan );
}
-----------------------------------------------------------------------------------------
And in application of Host (VB6.0) , I use the structure following:
Dim rtdx As Object
Dim size1 As integer
Dim size2 As integer
-----------------OutputChannel is opened first--------------------------------------------
Set rtdx = CreateObject("RTDX")
status = rtdx.Open("ochan", "R")
---------------------------------------------------
------------when CCS is being run , these following Function start to run---------------------------------------------
status = rtdx.ReadI2(size1)
status = rtdx.ReadI2(size1)
------------------------------------------------
status = rtdx.Close()
Set rtdx = Nothing
--------------------------------------------------------------------------------------------
When I debug in ccs, function RTDX _write() work very good, status = 1
But size1 & size2 in VB is allway =0
Tell me what is wrong??
Anyone help me!!!!!
Thank you very much!