#ifndef _TIMEOUT_H_
#define _TIMEOUT_H_

#include "../../_Lib-3.5/CMSIS/stm32f10x.h"
#include "../../User/includes.h"



typedef struct
{
  uint8_t flag;
  uint32_t counter;
  uint32_t timeout;
}__attribute__((packed)) timeout_t;

extern void timeout_setValue(timeout_t *tt,uint32_t val);
extern void timeout_start(timeout_t *tt);
extern void timeout_stop(timeout_t *tt);
extern uint8_t timeout_isOut(timeout_t *tt);

#endif
