gprs.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef _GPRS_H_
  2. #define _GPRS_H_
  3. #include <rtthread.h>
  4. #include "stm32g0xx_hal.h"
  5. #include "sys.h"
  6. #include "stdbool.h"
  7. #include "main.h"
  8. #include "string.h"
  9. #include "bsp_rtc.h"
  10. #define Get_GpsBuffCnt 512
  11. extern uint16_t Gte_GpsCnt;
  12. extern uint8_t Get_GpsFlag;
  13. extern uint8_t Get_GpsBuff[Get_GpsBuffCnt];
  14. #if(Node_Type == LTE)
  15. #define send_buf_len 1024+512+128
  16. #else
  17. #define send_buf_len 1024
  18. #endif
  19. #define json_buf_len 2048
  20. #define CONTROL_3V8 PBout(4) //输出IO控制.
  21. //连接超时技术
  22. void link_timeout_cnt(void);
  23. void Usart_SendString(UART_HandleTypeDef huart,char *str);
  24. //usart3输出固定长度
  25. void Usart3_Send_Len( uint8_t *str,uint16_t len);
  26. void data_process(void);
  27. void CMD_Find(void);
  28. uint8_t str_cmd(void);
  29. extern char *Send_Buff;
  30. typedef struct
  31. {
  32. uint32_t LON; //GPS 经度
  33. uint32_t LAT; //GPS 纬度
  34. uint32_t HGT; //GPS 高度
  35. uint8_t succ; //经纬度获取成功
  36. } Location;
  37. typedef union
  38. {
  39. uint16_t U16[2];
  40. float f_value;
  41. } U16_Float;
  42. #endif