[FIXED] something wrong

This commit is contained in:
xudx 2024-11-13 15:23:09 +08:00
parent c75567c98e
commit 6c057974e0
6 changed files with 22 additions and 15 deletions

View File

@ -38,6 +38,8 @@ set(DRV_SOURCE
${PROJECT_SOURCE_DIR}/drv/drv_do.c
# UART
${PROJECT_SOURCE_DIR}/drv/drv_uart.c
# CAN
${PROJECT_SOURCE_DIR}/drv/drv_can.c
# TCP
${PROJECT_SOURCE_DIR}/drv/drv_tcp.c
)

View File

@ -1,18 +1,4 @@
#include "drv_can.h"
#include <errno.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <linux/can.h>
#include <linux/can/raw.h>
#include <termios.h> /*PPSIX 终端控制定义*/
#include "drv_can.h"
/*
* @description :

View File

@ -1,11 +1,25 @@
#ifndef __DRV_CAN_H_
#define __DRV_CAN_H_
#define _DEFAULT_SOURCE
#include <linux/can.h>
#include <errno.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <linux/can.h>
#include <linux/can/raw.h>
#include <termios.h> /*PPSIX 终端控制定义*/
#define CAN_MODE 0
#define CAN_FD_MODE 1
#define _DEFAULT_SOURCE
/*CAN口参数结构体 */
typedef struct

View File

@ -1,6 +1,8 @@
#ifndef __DRV_TCP_H_
#define __DRV_TCP_H_
#define _DEFAULT_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -6,6 +6,7 @@
#include "drv_di.h"
#include "drv_do.h"
#include "drv_uart.h"
#include "drv_can.h"
#include "drv_tcp.h"
void runTest()

View File

@ -1,6 +1,8 @@
#ifndef __TEST_H_
#define __TEST_H_
#define _DEFAULT_SOURCE
void runTest();
void testDI();
void testDO();