/* Add spinner to spincollection. 
This function adds an initialized spinner to a spincollection and positions it below any other spinners in the spincollection on the screen. The spinners in the spincollection are linked together and number of spinners is updated. It is not possible to add more spinners than maximum number ofspinners in a spincollection". */
void gfx_mono_spinctrl_spincollection_add_spinner(struct gfx_mono_spinctrl *spinner, struct gfx_mono_spinctrl_spincollection *spinners)
/* Add spinner to spincollection. 
This function adds an initialized spinner to a spincollection and positions it below any other spinners in the spincollection on the screen. The spinners in the spincollection are linked together and number of spinners is updated. It is not possible to add more spinners than maximum number ofspinners in a spincollection". */
void gfx_mono_spinctrl_spincollection_add_spinner(struct gfx_mono_spinctrl *spinner, struct gfx_mono_spinctrl_spincollection *spinners)
{
	uint8_t i;
	struct gfx_mono_spinctrl *lastspinner;
	if (spinners->number_of_spinners >=
			GFX_MONO_SPINCTRL_MAX_ELEMENTS_IN_SPINCOLLECTION) {
		return;
	}
	spinner->y = (SYSFONT_HEIGHT + 1) * spinners->number_of_spinners;
	if (spinners->number_of_spinners == 0) {
		spinners->collection = spinner;
	} else {
		lastspinner = spinners->collection;
		for (i = 1; i < spinners->number_of_spinners; i++) {
			lastspinner = lastspinner->next;
		}
		lastspinner->next = spinner;
		spinner->prev = lastspinner;
	}
	spinners->collection_last = spinner;
	spinners->number_of_spinners++;
}