EBIKE-FreeRTOS/Source/EC800M_4G.h

46 lines
1.1 KiB
C

#ifndef EC800M_4G_H
#define EC800M_4G_H
/* Scheduler include files. */
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pico/stdlib.h"
#include "hardware/uart.h"
#include <stdio.h>
#include "pico/stdlib.h"
#include "hardware/gpio.h"
#include "hardware/clocks.h"
#include "hardware/watchdog.h"
#include "pico/multicore.h"
#include "hardware/i2c.h"
#include "pico/binary_info.h"
#include "hardware/uart.h"
#include "hardware/pwm.h"
#include "hardware/adc.h"
#define EC800M_4G_UART uart1
#define EC800M_4G_UART_TX 9 // 接EC800M TX 上
#define EC800M_4G_UART_RX 8 // 接EC800M RX 上
#define EC800M_4G_DATA_BITS 8
#define EC800M_4G_STOP_BITS 1
#define EC800M_4G_UART_BAUD_RATE 115200
#define TCP_MAX_RETRY 3 // TCP建立最大重试次数
#define _4G_DATA_LENGTH 8192 // 数组最大长度
#define SERVER_HOST "123.60.29.178" // TCP服务器IP
#define SERVER_POER 8009 // TCP服务器端口
#define _QIOPEN "AT+QIOPEN=1,0,\"TCP\",\"%s\",%d,0,1\r\n"
extern void EC800M_4G(void *p);
#endif