This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UART_write for integer values

Hello All,

I've got stuck with a stupid issue. I'm using c5500 for the C5535 on the eZDSP board. I have a large Uint16 array which I am trying to write out using the CSL function UART_write(). According to the example in the CSL API reference manual 

//example
Uint16 length = 4;
char pbuf[4] = {0x74, 0x65, 0x73, 0x74};
CSLBool returnFlag;
ReturnFlag = UART_write(&pbuf[0],length,0);


//I want to do the following
#define BUFFER_MAX_SIZE (8192u)
Uint16 Buff[BUFFER_MAX_SIZE/2];
//initialize Buff with some 16bit values 
//initialize uart
UART_write(Buff, BUFFER_MAX_SIZE/2, 0);


//I tried the following but get the error: "argument of type "char" is incompatible with parameter of type "CSL_UartHandle""
#define BUFFER_MAX_SIZE (8192u)
Uint16 Buff[BUFFER_MAX_SIZE/2];
unsigned char *cBuff=(char *)Buff;
//initialize Buff with some 16bit values 
//initialize uart
UART_write(cBuff, BUFFER_MAX_SIZE, 0);

Any ideas... Thanks!
Milind
  • Are you absolutely sure you've copied the source code and the error message exactly?  I don't see any "char" values being passed to UART_write.  cBuff is of type "unsigned char *", not "char".  Perhaps there is a macro named cBuff somewhere in a header file?  Try changing the name of cBuff to something unique.