/****************************************************************************** * @file drv_eg25gminipice.h * @brief drv_eg25gminipice drivers * @version V1.0 * @author Gary * @copyright ******************************************************************************/ #ifndef DRV_EG25GMINIPICE_H_ #define DRV_EG25GMINIPICE_H_ #include "drv_gpio.h" #include "stm32f4xx.h" #include "bsp_task.h" #include "kit_time.h" #include "kit_data.h" #include "kit_debug.h" #include "ucos_ii.h" #include "string.h" #define MAX_RECV_LEN 1024 //定义模组4G结构 typedef struct _Lte4GItem { uint8_t addr; uint8_t comm_dev; uint16_t buf_pos; uint16_t buf_size; uint8_t *buf; } Lte4GItem; #define LTE4G_STATIC_INIT(_name, _addr, _comm_dev, _buf_pos, _buf_size,_recv) \ Lte4GItem _name = \ { \ (_addr), \ (_comm_dev), \ (_buf_pos),\ (_buf_size),\ (_recv),\ } extern Lte4GItem sim_item; void drv_uart2_Init(void); void drv_uart2_sendbyte(char c); void drv_uart2_sendString(const char *str); void drv_send_at_cmd(const char *cmd, int delay_ms); void drv_eg25g_init(void); void drv_mqtt_connect(void); void drv_mqtt_publish(const char *topic, const char *message); void drv_sim_push_data(Lte4GItem* item, uint8_t *buf, uint16_t len); #endif //DRV_EG25GMINIPICE_H_