36 lines
912 B
C++
36 lines
912 B
C++
#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 |