This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Error[Pe167]:argument of type "void(*)(void)" is incompatible with parameter of type "void*"

I converted a project from uVIsion to IAR, and I get an error when I use app_timer_start(); the error says: Error[Pe167]: argument of type "void ()(void)" is incompatible with parameter of type "void"

this is part of the code: {

if((En==true)&&(!Rainbow_Flashslow_flag))
	{
		Rainbow_Flashslow_flag = En;
		led_flash_timer_stop();
		LEDModeflg  |= 0x08;
		 app_timer_start(flash_schedule_timer,5,RGB_PWM_LED); // this is the error
		LOG("[LEDPWM]: Rainbow ON LED \r\n");	
	}

app_timer_start:

uint32_t app_timer_start(app_timer_id_t timer_id, uint32_t timeout_ticks, void * p_context)

RGB_PWM_LED:

void RGB_PWM_LED(void)
{
     static uint8_t calu_r=0;
     static uint8_t calu_g=0;
     static uint8_t calu_b=0;
if(Rainbow_Flashslow_flag)
{
   RGB_pwm_low_time++;
   if(RGB_pwm_low_time ==((256/4)-1))
   {
   	RGB_pwm_low_time=0;
		calu_r = Caluvalue.Red;		
		calu_g= Caluvalue.Green;
		calu_b= Caluvalue.blue;
   }
   
   if(calu_r)
   {calu_r--;
   nrf_gpio_pin_clear(BSP_LED_2);
   }else
   {nrf_gpio_pin_set(BSP_LED_2);}
   if(calu_g)
   {calu_g--;
   nrf_gpio_pin_clear(BSP_LED_0);
   }else
   {nrf_gpio_pin_set(BSP_LED_0);}
   if(calu_b)
   {calu_b--;
   nrf_gpio_pin_clear(BSP_LED_1);
   }else
   {nrf_gpio_pin_set(BSP_LED_1);}
}

}

Related