| 12345678910111213141516171819 |
- #ifndef _TIMEOUT_H_
- #define _TIMEOUT_H_
- #include "../User/gd32f10x_it.h"
- typedef struct
- {
- uint8_t flag;
- uint8_t endMode; // 1:start 2: endNormal
- 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
|