Forums

Ouput an array of data to mcbsp on a 6711?

Started by Brain101 May 6, 2005
I am coding for a 6711 in C. I have an array of sampled data, which I would
like to output via the McBSP. Unfortunatly, on compiling I get the error
message "argument of type "unsigned int *" is incompatible with parameter
of type "int"". Does this think I'm trying to use a pointer? All i want to
do is output the entire array. Can anybody please help me?

  int i; 
  short int input1;
  short int input2;
  int tdmArray[0x7FFFFFF];

      for (i = 0; i >0x7FFFFFF; i=i+2)
      {
      input1 = mcbsp1_read();
      tdmArray[i] = input1;
      input2 = mcbsp1_read();
      tdmArray[i+1] = input2;
      }

   mcbsp1_write(tdmArray); 
		
This message was sent using the Comp.DSP web interface on
www.DSPRelated.com
Brain,

Can you give the definition of mcbsp1_write ?. I suspect it to be a
mismatch between the caller and callee arguments...

~Sandeep

On Thu, 05 May 2005 22:53:23 -0500, "Brain101" <brain_uk@hotmail.com>
wrote in comp.dsp:

> I am coding for a 6711 in C. I have an array of sampled data, which I would > like to output via the McBSP. Unfortunatly, on compiling I get the error > message "argument of type "unsigned int *" is incompatible with parameter > of type "int"". Does this think I'm trying to use a pointer? All i want to > do is output the entire array. Can anybody please help me? > > int i; > short int input1; > short int input2; > int tdmArray[0x7FFFFFF]; > > for (i = 0; i >0x7FFFFFF; i=i+2) > { > input1 = mcbsp1_read(); > tdmArray[i] = input1; > input2 = mcbsp1_read(); > tdmArray[i+1] = input2; > } > > mcbsp1_write(tdmArray); > > This message was sent using the Comp.DSP web interface on > www.DSPRelated.com
Most likely you the call to mcbsp1_write() is the opposite of mcbsp1_read(), that it is takes a single 16-bit integer value. That is certainly what the error message suggests. To output an array of values, you probably need to write a loop to call the function with each value, just as you wrote a loop to input them. -- Jack Klein Home: http://JK-Technology.Com FAQs for comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html comp.lang.c++ http://www.parashift.com/c++-faq-lite/ alt.comp.lang.learn.c-c++ http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html