This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Warning: c259: pointer: different mspace

I cannot get rid of this warning. All the documents I have read do not help at all. ( these include Keil forum search, Keil help function, the 8051 "bible", google e.t.c).

void halLcdWriteLine(uint8 line, const char* text)
{
   BYTE sendBuffer[50];
   UINT8 i, j;
   char c;

    if (text == NULL)
        return;

   i = 0;
   sendBuffer[i++] = LCD_ADDR;
   sendBuffer[i++] = REG_SEL_0;
   sendBuffer[i++] = ((line == HAL_LCD_LINE_1) ? LINE1_ADDR : LINE2_ADDR);
   smbSend(sendBuffer, i);

   i = j = 0;
   sendBuffer[i++] = LCD_ADDR;
   sendBuffer[i++] = REG_SEL_1;

   while( ( (c = text[j]) != '\0' ) && j < HAL_LCD_LINE_SIZE ){
      sendBuffer[i++] = lcdConvertChar(c);
      j++;
   }
   for ( ;j < HAL_LCD_LINE_SIZE; j++){
      sendBuffer[i++] = lcdConvertChar(' ');
   }
   smbSend(sendBuffer, i);
}

This function writes a line of text on an LCD (communicates using I2C). A typical call to this function looks like this:

  halLcdWriteLine(1, "Hello world");

Please help if you can.

0