first commit
This commit is contained in:
6
Inc/CanReceiveTask.h
Normal file
6
Inc/CanReceiveTask.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef __CAN_RECEIVE_TASK_H__
|
||||
#define __CAN_RECEIVE_TASK_H__
|
||||
|
||||
#include "System.h"
|
||||
|
||||
#endif
|
||||
8
Inc/SocketApiProtocol.h
Normal file
8
Inc/SocketApiProtocol.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef __SOCKET_API_PROTOCOL_H__
|
||||
#define __SOCKET_API_PROTOCOL_H__
|
||||
|
||||
#include "System.h"
|
||||
|
||||
void SocketApiProtocolInit(uint32_t SocketPort);
|
||||
|
||||
#endif
|
||||
36
Inc/System.h
Normal file
36
Inc/System.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef __SYSTEM_H__
|
||||
#define __SYSTEM_H__
|
||||
|
||||
#include "asio.hpp"
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <atomic>
|
||||
#include <stdint.h>
|
||||
|
||||
using TickType_t = uint32_t; //类似FreeRTOS的ms时间数
|
||||
|
||||
#define DISABLE 0x00
|
||||
#define ENABLE 0x01
|
||||
|
||||
#define PRODUCT_SC_HHS_USB_CAN_II 0 //四川和华盛USB-CAN-II
|
||||
#define PRODUCT_ZLG_USB_CAN_II 1 //zlg的USB-CAN-II
|
||||
#define PRODUCT_GC_USB_CAN_II 2 //GC的USB-CAN-II
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int ProductInfo; //产品信息
|
||||
int logEn; //日志记录开关
|
||||
int CanOpenStatus[2]; //CAN通道状态
|
||||
}SystemConfig;
|
||||
|
||||
extern SystemConfig SystemCall;
|
||||
|
||||
void logAdd(const std::string& filename, const std::string& content);
|
||||
void SystemCallInit(void);
|
||||
void vTaskDelay(TickType_t ms);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user