[Add] #define

This commit is contained in:
wangk 2024-11-21 09:11:11 +08:00
parent 22cdf9938d
commit bf9d6a823b
6 changed files with 12 additions and 2 deletions

View File

@ -13,7 +13,7 @@ set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
# , # ,
set(ProjectName "EMS_C_V1.0.0") set(ProjectName "EMS_C_V")
project(${ProjectName}) project(${ProjectName})
@ -26,7 +26,6 @@ include_directories(
${PROJECT_SOURCE_DIR}/drv ${PROJECT_SOURCE_DIR}/drv
${PROJECT_SOURCE_DIR}/lib ${PROJECT_SOURCE_DIR}/lib
${PROJECT_SOURCE_DIR}/model ${PROJECT_SOURCE_DIR}/model
${PROJECT_SOURCE_DIR}/test ${PROJECT_SOURCE_DIR}/test
) )

View File

@ -16,6 +16,10 @@
#include <pthread.h> #include <pthread.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#define INTERFACE "usb0"
#define SERVER_ADDR "47.120.14.45"
#define PORT 3001
void client(char interface[], char server_addr[], int server_port); void client(char interface[], char server_addr[], int server_port);
#endif #endif

View File

@ -12,6 +12,12 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include <net/if.h> #include <net/if.h>
#define CANNUM_RECV "can0"
#define CANNUM_SEND "can1"
#define CANIDNUM 3
#define CANDLC_RECV 8
#define CANDLC_SEND 8
void can_recv(char cannum[], unsigned int canID[], int canIDnum, int dataLength); void can_recv(char cannum[], unsigned int canID[], int canIDnum, int dataLength);
void can_send(char cannum[], unsigned int canID, char* dataToSend, int dataLength); void can_send(char cannum[], unsigned int canID, char* dataToSend, int dataLength);

0
kit/kit_mqtt.c Normal file
View File

0
kit/kit_mqtt.h Normal file
View File

View File

@ -8,6 +8,7 @@
#include "drv_uart.h" #include "drv_uart.h"
#include "drv_can.h" #include "drv_can.h"
#include "drv_tcp.h" #include "drv_tcp.h"
#include "drv_4g.h"
void runTest() void runTest()
{ {