optical/EMBOS/Users/EmbFunc/busmotos/ruanyictrl.h

39 lines
1.0 KiB
C
Raw Permalink Normal View History

2025-09-04 01:45:08 +00:00
#ifndef INKJETBASE_RUANYICTRL_H_
#define INKJETBASE_RUANYICTRL_H_
#include "config.h"
#if (BUSCTRL_MOTO == RUANYI)
#define BITMOVEADDR 9216 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
#define BITTOPOSADDR 9218 //λ<><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧλ<D3A6><CEBB>
#define BITSTOPCMD 0x0000
#define BITTOZEROCMD 0x0001
#define BITJOGPCMD 0x0002
#define BITJOGNCMD 0x0004
#define BITSETCPOSZEROCMD 0x0040
#define BITSETZEROCMD 0x0100
#define BITTOPOS0 0x0001 //<2F><><EFBFBD><EFBFBD>Ӧλ<D3A6><CEBB>0
#define BITTOPOS1 0x0002 //<2F><><EFBFBD><EFBFBD>Ӧλ<D3A6><CEBB>1
#define BITTOPOS2 0x0004 //<2F><><EFBFBD><EFBFBD>Ӧλ<D3A6><CEBB>2
#define BITTOPOS3 0x0008 //<2F><><EFBFBD><EFBFBD>Ӧλ<D3A6><CEBB>3
void InitRuanyiCom(void);
int MoveRyiToRelativePos(u8 devIdx, s16 pos, u16 spd);
int MoveRyiToAbsolutePos(u8 devIdx, s16 pos, u16 spd);
int MoveRyiJOGP(u8 devIdx, u16 spd);
int MoveRyiJOGN(u8 devIdx, u16 spd);
int RyiMotoStop(u8 devIdx);
int SetRyiCurPos(u8 devIdx, s16 pos);
int RyiMotoSetCurPosZero(u8 devIdx);
int GetCurPusPos(u8 devIdx, s16 * puspos);
int GetCurStatus(u8 devIdx, int * statuflg);
int RyiMotoToPos(u8 devIdx, u16 pos);
#endif
#endif /* INKJETBASE_RUANYICTRL_H_ */