first commit
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "CanReceiveTask.h"
|
||||
#include "CanProtocol.h"
|
||||
#include "System.h"
|
||||
|
||||
// 一个任务函数,C 风格
|
||||
void Task1(void* param) {
|
||||
@@ -25,4 +26,22 @@ void CanRecive(void)
|
||||
// 如果想模拟 FreeRTOS,通常任务一直运行,主函数也可以阻塞
|
||||
t1.join();
|
||||
t2.join();
|
||||
}
|
||||
|
||||
//打开CAN盒子,同时如果有初始化,这里也会初始化
|
||||
uint8_t CanOpen(uint8_t Product, int DeviceType, int Chnl, int Baud, int OtherTyp1, int OtherType2)
|
||||
{
|
||||
switch (Product)
|
||||
{
|
||||
case SC_HHS:
|
||||
break;
|
||||
case ZLG:
|
||||
break;
|
||||
case GC:
|
||||
break;
|
||||
case PEAK_CAN:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <time.h>
|
||||
#include "SocketApiProtocol.h"
|
||||
|
||||
#define RECV_BUFFER_SIZE 26 //接收缓冲区大小
|
||||
#define RECV_BUFFER_SIZE 82 //接收缓冲区大小
|
||||
|
||||
#define PKG_CORE_STATUS 0x00 //读取核心状态
|
||||
#define PKG_CAN_STATUS 0x01 //CAN盒子状态
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "CanReceiveTask.h" /* CAN接收任务 */
|
||||
#include "CanProtocol.h" /* CAN接收任务 */
|
||||
#include "SocketApiProtocol.h"
|
||||
|
||||
#define LISTEN_PORT 12345 //监听端口
|
||||
|
||||
Reference in New Issue
Block a user