72 lines
1.2 KiB
C
72 lines
1.2 KiB
C
|
|
|
|||
|
|
|
|||
|
|
//-------------------------------------------------------------------------------
|
|||
|
|
// File Name: workctrl.h
|
|||
|
|
// Brief:
|
|||
|
|
// Version: 1.0.0
|
|||
|
|
// Create Date: 2018/03/19
|
|||
|
|
// Create by: Marshal Lee
|
|||
|
|
// Copyright:
|
|||
|
|
// Copyright (c) 2017, Richpeace Co., LTD.
|
|||
|
|
// All rights reserved.
|
|||
|
|
//
|
|||
|
|
// Modify by: Marshal Lee
|
|||
|
|
// Modify Date: 2018/03/19
|
|||
|
|
//-------------------------------------------------------------------------------
|
|||
|
|
|
|||
|
|
#ifndef __WORKCTRL_H__
|
|||
|
|
#define __WORKCTRL_H__
|
|||
|
|
|
|||
|
|
#include "config.h"
|
|||
|
|
|
|||
|
|
#if (CONTROL_BUS == COMM_CAN)
|
|||
|
|
#include "canwork.h"
|
|||
|
|
#include "sewhdcontrol.h"
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
//----------------------------
|
|||
|
|
|
|||
|
|
typedef struct
|
|||
|
|
{
|
|||
|
|
//-----------------------
|
|||
|
|
int workSta; // <20><><EFBFBD><EFBFBD>״̬, = 0, <20><>ʼ<EFBFBD><CABC>״̬; = 1, <20><><EFBFBD><EFBFBD>״̬; = 2, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
|
|||
|
|
|
|||
|
|
//-----------------------
|
|||
|
|
u8 device; // <20><><EFBFBD>ڵ<EFBFBD><DAB5>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>
|
|||
|
|
u8 nodeId; // <20><><EFBFBD>ڵ<EFBFBD>ID
|
|||
|
|
|
|||
|
|
u8 hostDev; // <20><><EFBFBD>ڵ<EFBFBD><DAB5>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>
|
|||
|
|
u8 hostId; // <20><><EFBFBD>ڵ<EFBFBD>ID
|
|||
|
|
#if (CONTROL_BUS == COMM_CAN)
|
|||
|
|
SewHeadControl curBdCtrl;
|
|||
|
|
#endif
|
|||
|
|
//-----------------------
|
|||
|
|
int idxSetSta;
|
|||
|
|
|
|||
|
|
}WorkCtrl;
|
|||
|
|
|
|||
|
|
#ifdef _IN_WORKCTRL_C
|
|||
|
|
WorkCtrl g_workCtrl;
|
|||
|
|
#else
|
|||
|
|
extern WorkCtrl g_workCtrl;
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
//----------------------------
|
|||
|
|
|
|||
|
|
|
|||
|
|
void InitWorkCtrl(void);
|
|||
|
|
|
|||
|
|
void WorkCtrlTask(void);
|
|||
|
|
|
|||
|
|
//----------------------------
|
|||
|
|
|
|||
|
|
void DelayRef(u32 ms);
|
|||
|
|
|
|||
|
|
//----------------------------
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endif
|