Seeed_Arduino_FreeRTOS icon indicating copy to clipboard operation
Seeed_Arduino_FreeRTOS copied to clipboard

Multiple definition of delay

Open simon88 opened this issue 3 years ago • 0 comments
trafficstars

Hi, I got an error when I try to compiled for an SAMD21E17A multiple definition of delay conflit with delay.c in samd core and delay in FreeRTOSVariant.c

/*
 * override Arduino delay()
 */
extern void _real_delay(unsigned long ms);
void delay(unsigned long ms)
{
  if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED)
  {
    vTaskDelay(ms / portTICK_PERIOD_MS);
  }
  else
  {
    _real_delay(ms);
  }
}

If I renamed this function by delay2 for examle it's works but it's doesn't compile beceause delay2 was not declared in this scope...

simon88 avatar Jul 12 '22 13:07 simon88