Hi,
I have the following :
typedef struct _S_PWM_LED
{
E_LED_STATUS eStatus; /* Led Status (ON-OFF-BLINK-BACKLIGTH) */
uint8 Level; /* Level in number of PWM TIC */
void (*PtrOnMethod)(LDD_TDeviceData); /* pointer to On function */
void (*PtrOffMethod)(LDD_TDeviceData); /* pointer to Off function */
}S_PWM_LED;
And when I declare my main LED struct, I used processor Expert component methods to initialize my struct.
S_PWM_LED m_sDel[NBR_LED] =
{
{LED_BLINK, MAX_PWM_TIC, LED_PWR_ClrVal , LED_PWR_SetVal }, // LED_POWER
{LED_OFF , MAX_PWM_TIC, LED_CPU_ClrVal , LED_CPU_SetVal }, // LED_CPU
{LED_OFF , MAX_PWM_TIC, LED_MOTOR1_ClrVal, LED_MOTOR1_SetVal}, // LED_MOTOR1
{LED_OFF , MAX_PWM_TIC, LED_MOTOR2_ClrVal, LED_MOTOR2_SetVal}, // LED_MOTOR2
};
I have this warning message that comes up :
initialization from incompatible pointer type [enabled by default] (near initialization for 'm_sDel[0].PtrOnMethod') [enabled by default]
initialization from incompatible pointer type [enabled by default] (near initialization for 'm_sDel[0].PtrOffMethod') [enabled by default]
and so on for the next one.
How can I correct the warning message without removing it from the linker or compiler ?
please upload your project here. we need to reproduce the problem. thanks!
Best Regards,
ZhangJun