nettimer.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. typedef struct _key_func
  14. {
  15. uint8_t state;
  16. uint16_t num;
  17. timeout_t tt_key_state;
  18. uint8_t keyvalue;
  19. uint8_t optcmd; // 执行的动作
  20. }key_func_t;
  21. extern key_func_t key_info;
  22. extern timeout_t g_timeOut;
  23. extern timeout_t g_usmTimeOut;
  24. extern timeout_t g_uart4Time; // 串口4的接收中断计时
  25. extern timeout_t g_uart5Time; // 串口5的接收中断计时
  26. extern timeout_t g_uart2Time; // 串口5的接收中断计时
  27. extern void timeout_setValue(timeout_t *tt,uint32_t val);
  28. extern void timeout_start(timeout_t *tt);
  29. extern void timeout_stop(timeout_t *tt);
  30. extern uint8_t timeout_isOut(timeout_t *tt);
  31. #endif