/**
 * This function is periodically called by MIOS. The frequency has to be
 * initialized with MIOS_Timer_Set
 */
void Timer(void) __wparam
{
unsigned char i=0x00;


	if(eb_request.error) {
		led_time++;
		return;
	}

	if (get_userdata>1) {
		led_time++;
		return;
	}

	if (send_editbuffer>1) {
		send_editbuffer--;
	}





	if(eb_request.active) {
		if(((eb_request.dump.typ>>6)&0x01)==1) {
			if(eb_request.timer>=(((eb_request.dump.typ>>2)&0x0F))) {
				requestNextDump();
			} else
				eb_request.timer++;
		} else if(((eb_request.dump.typ>>6)&0x01)==0) {
			if(eb_request.timer>(((eb_request.dump.typ>>2)&0x0F)*50)) {
				eb_request.error=1;
				update=0x08;
				eb_request.active=0;
				modus=MOD_MODUL;
				for(i=0;i<4;i++)
					MIOS_DOUT_PinSet(i,bank==i?1:0);
			}
			else
				eb_request.timer++;
		}
		//get_userdata=0x00;
		return;
	}

}
