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.
i got the Error when i compile my code in IAR for MSP430F5529 MC.
Error[Pe167]: argument of type "tDisplay const *" is incompatible with parameter of type "void *" D:\HD\Firmware\New_MC\Msp430F5529LP\ILI9341-based TFT _MSP430\OneMoreAgain\LcdDriver\Template_Driver.c 304
InitLCDDisplayBuffer(&g_sTemplate_Driver, 0xFF);
// Initialize DisplayBuffer.
// This function initializes the display buffer and discards any cached data.
static void
InitLCDDisplayBuffer(void *pvDisplayData, uint16_t ulValue)
{
uint16_t i=0,j=0;
for(i =0; i< LCD_Y_SIZE; i++)
for(j =0; j< (LCD_X_SIZE * BPP + 7) / 8; j++)
Template_Memory[i * LCD_Y_SIZE + j] = ulValue;
any solution?
Hi,
the error message is pretty clear, you are trying to pass address of "tDisplay const g_sTemplate_Driver" as the first parameter of InitLCDDisplayBuffer(void* pVDisplayData, uint16_t ulValue).
Usually you can just try to cast this, but depending on how you implement the InitLCDDDisplayBuffer, if you try to write something to the pvDisplayData parameter, I am afradi this won't work since the g_Template_Driver is defined as a const variable which will probably mean it will reside in the Flash.
tDisplay /* What is the type? */
The pointer is a variable in the compiler, the compiler need know the pointer type.
**Attention** This is a public forum