forked from gary/BCU
2
0
Fork 0
BCU/library/drv_peripheral/drv_eg25gminipice.h

60 lines
1.3 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/******************************************************************************
* @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_