// I-87123_API.h : main header file for the I-87123_API DLL
//

#ifndef __I87123W_H
#define __I87123W_H

#ifdef __cplusplus
extern "C" {
#endif


#ifdef I87123_API_EXPORTS
//#define I87123_API extern "C" __declspec(dllexport)
#define I87123_API
#else
#define I87123_API extern "C" __declspec(dllimport)
#endif

// CANopen Master Error Code Define
#define CPM_NoError         0

#define CPM_OpenComErr		2
#define CPM_SlotNumberErr   3

#define CPM_ConfigErr       5
#define CPM_MasterInitErr   6
#define CPM_MasterNotInit   7
#define CPM_ListenMode      8
#define CPM_NodeErr         9
#define CPM_NodeExist       10
#define CPM_AddModeErr		11
#define CPM_TxBusy          12
#define CPM_UnknowCmd       13
#define CPM_CmdReceErr      14
#define CPM_DataEmpty       15
#define CPM_MemAllocErr     16
#define CPM_SendCycMsgErr   17
#define CPM_StatusErr       18

#define CPM_SetGuardErr     20 
#define CPM_SetHbeatErr     21 
#define CPM_SegLenErr       22
#define CPM_SegToggleErr    23
#define CPM_SegWriteErr     24 
#define CPM_Abort           25
#define CPM_PDOLenErr       26 
#define CPM_COBIDErr        27
#define CPM_PDOInstErr      28
#define CPM_PDODynaErr      29
#define CPM_PDONumErr       30
#define CPM_PDOSetErr       31
#define CPM_PDOEntryErr     32
#define CPM_SetCobIdErr     33
#define CPM_CycFullErr      34
#define CPM_Timeout         35
#define CPM_DataLenErr		36

#define CPM_SendLose		38
#define CPM_SendCmdErr		39
#define CPM_Wait			40
#define CPM_Processing		41
#define CPM_ComPortPause    42

#define CPM_LoadEDSErr		50
#define CPM_EDSFormatErr	51

// CANopen Master NMTErr Event Define
#define CPM_Node_Guarding_Event		1
#define CPM_Heartbeat_Event			2

////////////////////////////////////////
//	I-87123 function library
////////////////////////////////////////

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetVersion
// Description: Return I87123.dll version
// Parameter: void
////////////////////////////////////////
I87123_API WORD I87123_GetVersion(void);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_SetFunctionTimeout
// Description: Set function timeout
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  FunTimeout: Max timeout ms of per function (default value = 1000 ms).
////////////////////////////////////////
I87123_API void I87123_SetFunctionTimeout(BYTE SlotNo, DWORD FunTimeout);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetCANStatus
// Description: Get CAN error status of the I-87123 slot module
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//            *bStatus: get CAN error status 
////////////////////////////////////////
I87123_API WORD I87123_GetCANStatus(BYTE SlotNo, BYTE *bStatus);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_Pause
// Description: Pause backplane com port access of I-87123 to avoid other I-87K module can't access backplane com port.
// Parameter: Timeout_ms: The Max. pause time value.		  
////////////////////////////////////////
I87123_API void I87123_Pause(DWORD Timeout_ms);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_Start (default)
// Description: Start backplane com port access of I-87123. It will cause other I-87K module access backplane com port fail.
// Parameter: void
////////////////////////////////////////
I87123_API void I87123_Start(void);

///////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_InitMaster
// Description: Initial Master, must be call once before all others function
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      hPort: Backplane Com port handle (CE5/CE6:COM0, XPe:COM1 115200 n 8 1)
//			  Node: 0 is for normal Master, 1 ~ 127 are for Master of slave-mode.
//					The slave-mode Master has node id and can be controled by other CANopen device.
//					We have provided some ISR function for user to do this.
//			  BaudRate: 0 ~ 7 ==> 10 k ~ 1000 k bps
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_InitMaster(BYTE SlotNo, HANDLE hPort, BYTE Node, BYTE BaudRate, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_ShutdownMaster
// Description: Let I-87123 shutdown (reset)
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
////////////////////////////////////////
I87123_API WORD I87123_ShutdownMaster(BYTE SlotNo);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_MasterSendBootupMsg
// Description: Let I-87123 send a boot up message (only for Master Node >= 1)
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
////////////////////////////////////////
I87123_API WORD I87123_MasterSendBootupMsg(BYTE SlotNo, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_SetMasterMode
// Description: Set Master to normal mode or listen mode
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Mode: 0 is normal mode (default), 1 is listen mode (default)
//					If set the Master to listen mode, the Master will can't send any CANopen message
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_SetMasterMode(BYTE SlotNo, BYTE Mode, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetMasterMode
// Description: Get Master mode
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      *Mode: 0 is normal mode (default), 1 is listen mode
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_GetMasterMode(BYTE SlotNo, BYTE *Mode, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetFirmwareVersion
// Description: Get I87123 firmware version
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  *Fir_Ver: I-87123 firmware version
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_GetFirmwareVersion(BYTE SlotNo, WORD *Fir_Ver, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_EDS_Load
// Description: Load EDS File
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node
//			  *FilePath: EDS file path (ex: "\\Temp\\ABC.EDS")
//			  DelayTime: After send a CAN message will delay some time
//			  ResTimeout: Set CAN message timeout
////////////////////////////////////////
I87123_API WORD I87123_EDS_Load(BYTE SlotNo, BYTE Node, char* FilePath, WORD DelayTime, WORD ResTimeout, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_AddNode
// Description: Add Slave Node to Master
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node
//            AddMode: 1:Auto Add Node, 2:Add Manual, 3:Wait to Add
//			  DelayTime: After send a CAN message will delay some time
//			  ResTimeout: Set CAN message timeout
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_AddNode(BYTE SlotNo, BYTE Node, BYTE AddMode, WORD DelayTime, WORD ResTimeout, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_RemoveNode
// Description: Remove Slave Node from Master
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node Id
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_RemoveNode(BYTE SlotNo, BYTE Node, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_RemoveAndResetNode
// Description: Remove Slave and then Reset Node from Master
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node Id
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_RemoveAndResetNode(BYTE SlotNo, BYTE Node, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_DelayAndResponseTimeout
// Description: Change delay time and response timeout value of the node
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node Id
//			  DelayTime: After send a CAN message will delay some time
//			  ResTimeout: Set CAN message timeout 
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_DelayAndResponseTimeout(BYTE SlotNo, BYTE Node, WORD DelayTime, WORD ResTimeout, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_ScanNode
// Description: Scan real node id on the CANopen bus
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      S_Node: Start scan node id
//			  E_Node: End scan node id
//					  If S_Node > E_Node or E_Node = 0, will scan all node id (1~127)
//			  *NodeList: 16 BYTE Array. Return Node Id List of the CANopen Bus. Each bit represents a slave node
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_ScanNode(BYTE SlotNo, BYTE S_Node, BYTE E_Node, BYTE *NodeList, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetNodeList
// Description: Get Node Id List of the Master had added
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  *NodeList: 16 BYTE Array. Return Node Id List of the Master had added. Each bit represents a slave node
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_GetNodeList(BYTE SlotNo, BYTE *NodeList, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_NMTChangeState
// Description: Set Node State
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Node: Slave Node Id
//			  State: NMT State 
//			        (1:Operation mode, 2:Stop mode, 128:Pre-operation mode, 129:Reset node, 130:Reset communication)
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_NMTChangeState(BYTE SlotNo, BYTE Node, BYTE State, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_NMTGetState
// Description: Get Node State
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Node: Slave Node Id
//			  *State: Return NMT State
//					 (4:Stop mode, 5:Operation mode, 127:Pre-operation mode)
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_NMTGetState(BYTE SlotNo, BYTE Node, BYTE *State, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_NMTGuarding
// Description: Start Guarding
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Node: Slave Node Id
//			  GuardTime: set index 0x100C 
//						(Master will send Guarding message per GuardTime ms).
//			  LiftTime: set index 0x100D 
//						(If Master doesn't receive Guarding response over LiftTime times, it will timeout and Node_Guarding_Event occur)
//						(The Guarding timeout = GuardTime * LiftTime )
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
// Note 1: It is not allowed for one slave to use both Guarding protocol and Heartbeat protocol at the same time. 
// Node 2: In listen mode, the function will listen the Guarding message send from other Master to slave on the CANopen bus. 
////////////////////////////////////////
I87123_API WORD I87123_NMTGuarding(BYTE SlotNo, BYTE Node, WORD GuardTime, BYTE LiftTime, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_NMTHeartbeat
// Description: Start Heartbeat
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Node: Slave Node Id
//			  ProduceTime: set index 0x1017
//			  ConsumeTime: Timeout of Heartbeat
//						   (ConsumeTime must more then ProduceTime)
//						   (If Master doesn't receive slave Heartbeat over ConsumeTime ms, it will timeout and Heartbeat_Event occur)
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
// Note: It is not allowed for one slave to use both Guarding protocol and Heartbeat protocol at the same time.
// Node 2: In listen mode, the function will listen only and can't start Heartbeat protocol. So Heartbeat protocol must start from other Master. 
////////////////////////////////////////
I87123_API WORD I87123_NMTHeartbeat(BYTE SlotNo, BYTE Node, WORD ProduceTime, WORD ConsumeTime, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_SDOReadData
// Description: SDO Read Data. If the data length is more than 1024 bytes, the Data will return NULL,
//				and user need uses CPM100_SDOReadFile to read the SDO data.
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Node: Slave Node Id
//			  Index: Index of Object Dectionary
//			  SubIndex: SubIndex of Object Dectionary
//			  *RDLen: Response Data Length
//			  *RData: Response Data (If RDLen >= 1024, this parameter will return NULL.)
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_SDOReadData(BYTE SlotNo, BYTE Node, WORD Index, BYTE SubIndex, DWORD *RDLen, BYTE *RData, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_SDOReadFile
// Description: SDO Read File. After I87123_SDOReadData, if the data length is more than 1024 bytes,
//				user need uses this function to read the SDO data file.
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Node: Slave Node
//			  *Index: Index of Object Dectionary
//			  *SubIndex: SubIndex of Object Dectionary
//			  Start: Start position to read the SDO data file
//			  Len: Max read byte
//			  RDLen: Return read data length
//			  RData: Return data
////////////////////////////////////////
I87123_API WORD I87123_SDOReadFile(BYTE SlotNo, BYTE Node, WORD Index, BYTE SubIndex, DWORD Start, DWORD Len, DWORD *RDLen, BYTE *RData);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_SDOWriteData
// Description: SDO Write Data
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Node: Slave Node Id
//			  Index: Index of Object Dectionary
//			  SubIndex: SubIndex of Object Dectionary
//			  TDLen: Write Data Length
//			  *TData: Write Data
//			  *RDLen: Response Data Length
//			  *RData: Response Data
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_SDOWriteData(BYTE SlotNo, BYTE Node, WORD Index, BYTE SubIndex, DWORD TDLen, BYTE *TData, WORD *RDLen, BYTE *RData, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_SDOAbortTransmit
// Description: Send SDO Abort Message
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node Id
//			  Index: Index of Object Dectionary
//			  SubIndex: SubIndex of Object Dectionary
//			  *TData:  Abort Data
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_SDOAbortTransmit(BYTE SlotNo, BYTE Node, WORD Index, BYTE SubIndex, DWORD TData, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_PDOWrite
// Description: Output PDO data
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Cobid: PDO Cob Id
//			  DLen: Data Length
//			  *Data: PDO Data
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_PDOWrite(BYTE SlotNo, WORD Cobid, BYTE Offset, BYTE DLen, BYTE *Data, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_PDOWrite_Fast
// Description: Output PDO data directly
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Cobid: PDO Cob Id
//			  DLen: Data Length
//			  Data: PDO Data
////////////////////////////////////////
I87123_API WORD I87123_PDOWrite_Fast(BYTE SlotNo, WORD Cobid, BYTE Offset, BYTE DLen, BYTE *Data);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_PDORemote
// Description: Remote PDO data
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Cobid: PDO Cob Id
//			  *DLen: Response Data Length
//			  *Data: Response PDO Data
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_PDORemote(BYTE SlotNo, WORD Cobid, BYTE *DLen, BYTE *Data, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_PDORemote_Fast
// Description: Send requst to remote PDO data, but do not check the response
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Cobid: PDO Cob Id
////////////////////////////////////////
I87123_API WORD I87123_PDORemote_Fast(BYTE SlotNo, WORD Cobid);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_SetPDORemotePolling
// Description: Set PDO polling list for remote PDO (max 125 PDO one time)
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      PDOCnt: Total PDO number that want to be polling 
//			  Cobid: PDO list that want to be polling
//			  PollingTime: Min. polling Time
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_SetPDORemotePolling(BYTE SlotNo, BYTE PDOCnt, WORD *Cobid, WORD PollingTime, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetPDOLastData
// Description: Get PDO last data
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Cobid: PDO Cob Id
//			  *IsNew: Is new data, 0 is old data, 1 is new data
//			  *DLen: Get PDO Data Length
//			  *Data: Get PDO Data
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_GetPDOLastData(BYTE SlotNo, WORD Cobid, BYTE *IsNew, BYTE *DLen, BYTE *Data, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetMultiPDOData
// Description: Get multi PDO data (this function can get max 50 PDO data every times)
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      PDOCnt: Total PDO number that want to get 
//		      Cobid: All PDO Cob Id that want to get
//			  IsNew: Is new data, 0 is old data, 1 is new data
//			  DLen: PDO Data Length
//			  Data: PDO Data
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_GetMultiPDOData(BYTE SlotNo, BYTE PDOCnt, WORD *Cobid, BYTE *IsNew, BYTE *DLen, BYTE *Data, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetRxPDOID
// Description: Get Rx PDO Cob ID List of slave
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node Id
//			  *PDO_Cnt: Response RxPDO ID total number
//			  *Id_List: Response *PDO_Cnt number RxPDO ID List
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_GetRxPDOID(BYTE SlotNo, BYTE Node, BYTE *PDO_Cnt, WORD *Id_List, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetTxPDOID
// Description: Get Tx PDO Cob ID List of slave
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node Id
//			  *PDO_Cnt: Response TxPDO ID total number
//			  *Id_List: Response *PDO_Cnt number TxPDO ID List
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_GetTxPDOID(BYTE SlotNo, BYTE Node, BYTE *PDO_Cnt, WORD *Id_List, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_InstallPDO
// Description: Install PDO ID to Master
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node Id
//			  Cobid: PDO Cob ID
//			  RxTx: 0 is RxPDO, 1 is TxPDO 
//			  PDO_No: PDO No. 0 ~ 511
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_InstallPDO(BYTE SlotNo, BYTE Node, WORD Cobid, BYTE RxTx, WORD PDO_No, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_DynamicPDO
// Description: Dynamic PDO Mapping to Master
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node Id
//			  Cobid: PDO Cob ID
//			  RxTx: 0 is RxPDO, 1 is TxPDO 
//			  Entry: Mapping Entry
//			  EntryData: Mapping Data
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_DynamicPDO(BYTE SlotNo, BYTE Node, WORD Cobid, BYTE RxTx, BYTE Entry, DWORD EntryData, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_RemovePDO
// Description: Remove POD Entry
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node Id
//			  Cobid: PDO Cob ID
//			  Entry: Remove Entry, 0 is for whole PDO
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_RemovePDO(BYTE SlotNo, BYTE Node, WORD Cobid, BYTE Entry, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_ChangePDOID
// Description: Change POD ID
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Old_Cobid: Old Cobid
//			  New_Cobid: Want to change to New Cobid
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_ChangePDOID(BYTE SlotNo, WORD Old_Cobid, WORD New_Cobid, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetPDOMapInfo
// Description: Get PDO mapping information
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Cobid: PDO Cobid
//			  *PDONo: Get PDO No.
//			  *RxTx: 0 is RxPDO, 1 is TxPDO
//			  *Tx_Type: Transmission Type
//			  *Event_Timer: Event Timer
//			  *Entry_Cnt: Total entry number
//			  *Map_Data: Mapping Data
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_GetPDOMapInfo(BYTE SlotNo, WORD Cobid, WORD *PDONo, BYTE *RxTx, BYTE *Tx_Type, WORD *Event_Timer, BYTE *Entry_Cnt, DWORD *Map_Data, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_InstallPDO_List (Virtual List)
// Description: Install PDO and Mapping PDO Data to Master List.
//				This function like I87123_InstallPDO_List, but it only build a virtual PDO let Master
//				can control the PDO. The virtual PDO is not the real node slave necessarily.
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node Id
//			  Cobid: PDO Cob ID
//			  RxTx: 0 is RxPDO, 1 is TxPDO
//			  PDO_No: PDO No. 
//			  TransmitType: Set transmission type
//			  EventTimer: Set event timer
//			  EntryUse: Total Mapping Entry
//			  *EntryData: DWORD array for Total Mapping Data
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_InstallPDO_List(BYTE SlotNo, BYTE Node, WORD Cobid, BYTE RxTx, WORD PDO_No, BYTE TransmitType, WORD EventTimer, BYTE EntryUse, DWORD *EntryData, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_RemovePDO_List (Virtual List)
// Description: Remove PDO build from I87123_InstallPDO_List function
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node Id
//			  Cobid: PDO Cob ID
//			  Entry: Remove Entry, 0 is for whole PDO
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_RemovePDO_List(BYTE SlotNo, BYTE Node, WORD Cobid, BYTE Entry, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_PDOUseEntry
// Description: Change useful entry
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Cobid: PDO Cob ID
//			  Entry: useful entry
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_PDOUseEntry(BYTE SlotNo, WORD Cobid, BYTE Entry, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_PDOTxType
// Description: Set PDO Transmission Type
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Cobid: PDO Cob ID
//			  Tx_Type: Transmission Type
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_PDOTxType(BYTE SlotNo, WORD Cobid, BYTE Tx_Type, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_PDOEventTimer
// Description: Set PDO Event Timer
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Cobid: PDO Cob ID
//			  Timer: Event Timer
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_PDOEventTimer(BYTE SlotNo, WORD Cobid, WORD Timer, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_PDOInhibitTime
// Description: Set PDO Inhibit Time
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Cobid: PDO Cob ID
//			  Time: Inhibit Time
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_PDOInhibitTime(BYTE SlotNo, WORD Cobid, WORD Time, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_ChangeSYNCID
// Description: Change SYNC ID
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Node: Slave Node Id
//			  Cobid: SYNC ID
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_ChangeSYNCID(BYTE SlotNo, BYTE Node, WORD Cobid, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_SetSYNC_List (Virtual List)
// Description: Set or Change SYNC ID from Master
//				The function only build a virtual SYNC ID let Master can control it. 
//				The virtual SYNC ID is not the real one necessarily.
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node Id
//			  Cobid: PDO Cob ID
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_SetSYNC_List(BYTE SlotNo, BYTE Node, WORD Cobid, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetSYNCID
// Description: Get SYNC ID
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Node: Slave Node Id
//			  *Cobid: SYNC ID
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_GetSYNCID(BYTE SlotNo, BYTE Node, WORD *Cobid, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_SendSYNCMsg
// Description: Send SYNC message, most send 5 different SYNC at the same time
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Cobid: SYNC ID
//			  Timer: Cyclic timer, 0 is stop or send 1 time SYNC message
//			  Times: Cyclic times, 0 is always contiune
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_SendSYNCMsg(BYTE SlotNo, WORD Cobid, WORD Timer, DWORD Times, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: CPM_GetCyclicSYNCInfo
// Description: Get Cyclic SYNC Info
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  *Cobid: 5 WORD Array, SYNC ID
//			  *Timer: 5 WORD Array, Cyclic timer, 0 is stop or 1 time and
//			  *Times: 5 DWORD Array, Cyclic times, 0 is always contiune
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_GetCyclicSYNCInfo(BYTE SlotNo, WORD *Cobid, WORD *Timer, DWORD *Times, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_ChangeEMCYID
// Description: Change EMCY ID
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Node: Slave Node Id
//			  Cobid: EMCY ID
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_ChangeEMCYID(BYTE SlotNo, BYTE Node, WORD Cobid, BYTE BlockMode);

//////////////////////////////////////// 
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_SetEMCY_List (Virtual List)
// Description: Set or Change EMCY ID from Master
//				The function only build a virtual EMCY ID let Master can control it. 
//				The virtual EMCY ID is not the real one necessarily.
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node Id
//			  Cobid: PDO Cob ID
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_SetEMCY_List(BYTE SlotNo, BYTE Node, WORD Cobid, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetEMCYID
// Description: Get EMCY ID
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  Node: Slave Node
//			  *Cobid: EMCY ID
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_GetEMCYID(BYTE SlotNo, BYTE Node, WORD *Cobid, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_ReadLastEMCY
// Description: Get last message of the slave node
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      Node: Slave Node Id
//			  *IsNew: Is new data, 0 is old data, 1 is new data
//			  *Data: EMCY Data
//			  BlockMode: Function Mode: Non-block function mode = 0, Block function mode = 1
////////////////////////////////////////
I87123_API WORD I87123_ReadLastEMCY(BYTE SlotNo, BYTE Node, BYTE *IsNew, BYTE *Data, BYTE BlockMode);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetBootUpNodeAfterAdd
// Description: Get Boot up message after add node
// Parameter: *SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      *Node: Slave Node Id
////////////////////////////////////////
I87123_API WORD I87123_GetBootUpNodeAfterAdd(BYTE *SlotNo, BYTE *Node);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetEMCYData
// Description: Get EMCY data received from the PISO-CPM100(U)
// Parameter: *SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      *Node: Slave Node Id
//			  *Data: EMCY Data
////////////////////////////////////////
I87123_API WORD I87123_GetEMCYData(BYTE *SlotNo, BYTE *Node, BYTE *Data);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetNMTError
// Description: Get NMT Error Control message from CANopen slave. 
// Parameter: *SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      *Node: Slave Node Id
//			  *NMTErrMode: Get NMT Error mode.
//                         If Node_Guarding_Event, Mode = CPM_Node_Guarding_Event.
//                         And if Heartbeat_Event, Mode = CPM_Heartbeat_Event.
////////////////////////////////////////
I87123_API WORD I87123_GetNMTError(BYTE *SlotNo, BYTE *Node, BYTE *NMTErrMode);

// I87123_InstallBootUpISR:
// Driver Version: 2.01
// Firmware Version: 2.01
// After called I87123_InstallBootUpISR to install Boot ISR function.
// When the Master received a Boot up message send from other slave device witch
// had been added to the Master by calling I87123_AddNode, the Boot up ISR will be executed.
I87123_API WORD I87123_InstallBootUpISR(BYTE SlotNo, void (*BOOTISR)());
I87123_API WORD I87123_RemoveBootUpISR(BYTE SlotNo);

// I87123_InstallRxSDOISR:
// Driver Version: 2.01
// Firmware Version: 2.01
// After called I87123_InstallEMCYISR to install EMCY ISR function.
// When the Master received a EMCY message send from other slave device witch
// had been added to the Master by calling I87123_AddNode, the EMCY ISR will be executed.
I87123_API WORD I87123_InstallEMCYISR(BYTE SlotNo, void (*EMCYISR)());
I87123_API WORD I87123_RemoveEMCYISR(BYTE SlotNo);

// I87123_InstallNMTErrISR:
// Driver Version: 2.01
// Firmware Version: 2.01
// After called I87123_InstallNMTErrISR to install NMTErr ISR function.
// When the Master occured a Node_Guarding_Event or Heartbeat_Event, the NMTErr ISR will be executed.
I87123_API WORD I87123_InstallNMTErrISR(BYTE SlotNo, void (*NMTERRISR)());
I87123_API WORD I87123_RemoveNMTErrISR(BYTE SlotNo);


///////////////////////////////////////////////////////////////////////////////////////////////////
// Following ISR Funtions are only for Master with node id > 0.
// It means if the "Node" parameter of I87123_InitMaster is 0, the following functions will useless.
///////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetMasterReadSDOEvent
// Description: Get the Read SDO message for Master node id. 
// Parameter: *SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      *Index: Index of Object Dectionary.
//			  *SubIndex: SubIndex of Object Dectionary.
////////////////////////////////////////
I87123_API WORD I87123_GetMasterReadSDOEvent(BYTE *SlotNo, WORD *Index, BYTE *SubIndex);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetMasterWriteSDOEvent
// Description: Get the Write SDO message for Master node id. 
// Parameter: *SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      *Index: Index of Object Dectionary.
//			  *SubIndex: SubIndex of Object Dectionary.
//			  *WLen: Write Data Length.
//			  *WData: Write Data.
////////////////////////////////////////
I87123_API WORD I87123_GetMasterWriteSDOEvent(BYTE *SlotNo, WORD *Index, BYTE *SubIndex, BYTE *WLen, BYTE *WData);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_ResponseMasterSDO
// Description: Response SDO message from CPM100U
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  ResType: Response read/write to SDO message (0 is read response, 1 is write response)
//			  Index: Response Index of Object Dectionary
//			  SubIndex: Response SubIndex of Object Dectionary
//			  Len: Response data length (0 ~ 4) (Note: Write response must 0-byte)
//			  *Data: Response data array (max. 4-bytes)
////////////////////////////////////////
I87123_API WORD I87123_ResponseMasterSDO(BYTE SlotNo, BYTE ResType, WORD Index, BYTE SubIndex, BYTE Len, BYTE *Data);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetMasterRemotePDOEvent
// Description: Get the Remote PDO message for Master's PDO COB-ID. 
// Parameter: *SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      *CobId: PDO Cob Id.
////////////////////////////////////////
I87123_API WORD I87123_GetMasterRemotePDOEvent(BYTE *SlotNo, WORD *CobId);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_GetMasterRxPDOEvent
// Description: Get the Write PDO message for Master's PDO COB-ID. 
// Parameter: *SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//		      *CobId: PDO Cob Id.
//			  *WLen: Write Data Length.
//			  *WData: Write Data.
////////////////////////////////////////
I87123_API WORD I87123_GetMasterRxPDOEvent(BYTE *SlotNo, WORD *CobId, BYTE *WLen, BYTE *WData);

////////////////////////////////////////
// Driver Version: 2.01
// Firmware Version: 2.01
// Function: I87123_ResponseMasterPDO
// Description: Response remote PDO message from CPM100U
// Parameter: SlotNo: WinPAC/ViewPAC slot no. 0 ~ 7. XPAC slot no. 1 ~ 7
//			  CobId: Response remote PDO Cob Id.
//			  Len: Response data length (1 ~ 8).
//			  *Data: Response data array (max. 8-bytes).
////////////////////////////////////////
I87123_API WORD I87123_ResponseMasterPDO(BYTE SlotNo, WORD CobId, BYTE Len, BYTE *Data);

// I87123_InstallReadSDOISR:
// Driver Version: 2.01
// Firmware Version: 2.01
// If the Master had called I87123_InitMaster to initial Master with node n (128 > n > 0).
// After installed I87123_InstallReadSDOISR, when the Master received a Read RxSDO message (message Cob ID is 0x600+n)
// and the Master will produce an interrupt to execute the RSDOISR ISR function.
I87123_API WORD I87123_InstallReadSDOISR(BYTE SlotNo, void (*RSDOISR)());
I87123_API WORD I87123_RemoveReadSDOISR(BYTE SlotNo);

// I87123_InstallWriteSDOISR:
// Driver Version: 2.01
// Firmware Version: 2.01
// If the Master had called I87123_InitMaster to initial Master with node n (128 > n > 0).
// After installed I87123_InstallWriteSDOISR, when the Master received a Write RxSDO message (message Cob ID is 0x600+n)
// and the Master will produce an interrupt to execute the WSDOISR ISR function.
I87123_API WORD I87123_InstallWriteSDOISR(BYTE SlotNo, void (*WSDOISR)());
I87123_API WORD I87123_RemoveWriteSDOISR(BYTE SlotNo);

// I87123_InstallRxPDOISR:
// Driver Version: 2.01
// Firmware Version: 2.01
// If the Master had called I87123_InitMaster to initial Master with node n (128 > n > 0).
// And if the Master also had called I87123_InstallPDO_List to install a RxPDO to itself (ex: PDO Cob ID is 0x200+n).
// After installed I87123_InstallRxPDOISR, when the Master received the RxPDO message
// and the Master will produce an interrupt to execute the RXPDOISR ISR function.
I87123_API WORD I87123_InstallRxPDOISR(BYTE SlotNo, void (*RXPDOISR)());
I87123_API WORD I87123_RemoveRxPDOISR(BYTE SlotNo);

// I87123_InstallRemotePDOISR:
// Driver Version: 2.01
// Firmware Version: 2.01
// If the Master had called I87123_InitMaster to initial Master with node n (128 > n > 0).
// And if the Master also had called I87123_InstallPDO_List to install a TxPDO to itself (ex: PDO Cob ID is 0x180+n).
// After installed I87123_InstallRemotePDOISR, when the Master received the TxPDO message
// and the Master will produce an interrupt to execute the REMOTEPDOISR ISR function.
I87123_API WORD I87123_InstallRemotePDOISR(BYTE SlotNo, void (*REMOTEPDOISR)());
I87123_API WORD I87123_RemoveRemotePDOISR(BYTE SlotNo);


#ifdef __cplusplus
}
#endif


#endif // __I87123W_H
