nettimer.h 917 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef _NET_TIM_H_
  2. #define _NET_TIM_H_
  3. #include "../../_Lib-3.5/CMSIS/stm32f10x.h"
  4. #include "../../User/includes.h"
  5. #include "../globalDef.h"
  6. #include "uplink.h"
  7. #include "../gateway_collect/gateway_collect.h"
  8. #include "timeout.h"
  9. #define NETSEND_MSG_PERIOD (1*60)//(5*60) //(500*10)//*60) // 1为1S, 5为5S 5*60:5分钟
  10. #define NETSEND_HOUR_PERIOD (24*60*60) // 24小时
  11. extern volatile uint32_t TickCounter;
  12. extern void nettimer_init(void);
  13. extern void net_check_status(void);
  14. typedef struct _key_func
  15. {
  16. uint8_t state;
  17. uint16_t num;
  18. timeout_t tt_key_state;
  19. uint8_t keyvalue;
  20. uint8_t optcmd; // 执行的动作
  21. }key_func_t;
  22. extern key_func_t key_info;
  23. extern timeout_t g_timeOut;
  24. extern timeout_t g_usmTimeOut;
  25. extern void timeout_setValue(timeout_t *tt,uint32_t val);
  26. extern void timeout_start(timeout_t *tt);
  27. extern void timeout_stop(timeout_t *tt);
  28. extern uint8_t timeout_isOut(timeout_t *tt);
  29. #endif