/* Registers the event callback functions that should be called by the CAN interface.  */
static void LeafLightRegisterEvents(tCanEvents const *events)
/* Registers the event callback functions that should be called by the CAN interface.  */
static void LeafLightRegisterEvents(tCanEvents const *events)
{
  assert(events != NULL);
  if (events != NULL)
  {
    leafLightEventsList = realloc(leafLightEventsList,
                                  (sizeof(tCanEvents) * (leafLightEventsEntries + 1)));
    assert(leafLightEventsList != NULL);
    if (leafLightEventsList != NULL)
    {
      leafLightEventsEntries++;
      leafLightEventsList[leafLightEventsEntries - 1] = *events;
    }
    else
    {
      leafLightEventsEntries = 0;
    }
  }
}