📄 bspdotprnt.h
字号:
* g_ucprntPattern3
* s_usprntPatternCount
*
* 返 回:SUCCESS
*
******************************************************
*/
UINT1 bspDotReverseDealPattern
(
UINT1 _ucTempData, /* 开始取字模的地址 */
UINT1 _ucLangType /* 语言类型(0 ASCII 1阿拉伯语) */
);
/*
*****************************************************
*
* 函数名:bspDotChineseDealPattern
*
* 功 能:穿孔打印机汉字字模处理函数
*
* 输 入:s_ucPrntDoubleHigh
* s_ucprntCharSpace
* s_ucPrntDoubleWidth
*
* 输 出:g_ucprntPattern1
* g_ucprntPattern2
* g_ucprntPattern3
* s_usprntPatternCount
*
* 返 回:SUCCESS
*
******************************************************
*/
UINT1 bspDotChineseDealPattern
(
UINT4 _offset /* 开始取字模的地址 */
);
/*
******************************************************
*
* 函数名:bspDotByteToWord
*
* 功 能:对单字节字模数据拉长处理(0 1 1 0 -> 00 11 11 00)
*
* 输 入:无
*
* 输 出:无
*
* 返 回:N/A
*
******************************************************
*/
UINT1 bspDotByteToWord(UINT1 _ucByte);
/*
******************************************************
*
* 函数名:bspDotprntBitRead
*
* 功 能:读取字节某一位
*
* 输 入:无
*
* 输 出:无
*
* 返 回:N/A
*
******************************************************
*/
UINT1 bspDotprntBitRead
(
UINT1 _ucData, /* 读取字节数据 */
UINT1 _ucBit /* 处理字节某一位 */
);
/*
***************************************************
*
* 函数名:bspDotprntBitWrite
*
* 功 能:写字节数据的某一位
*
* 输 入:无
*
* 输 出:无
*
* 返 回:N/A
*
****************************************************
*/
void bspDotprntBitWrite
(
UINT1 *_ucData, /* [out]写字节数据 */
UINT1 _ucBit, /*第几位*/
UINT1 _ucBitValue /*位值*/
);
/*
**************************************************
*
* 函数名:bspDotPrntCheckHP
*
* 功 能:穿孔打印机检测HP开关触发信号
*
* 输 入:无
*
* 输 出:无
*
* 返 回:0-----未检测到HP位置
* 1-----检测到HP位置
*
**************************************************
*/
INT1 bspDotPrntCheckHP(void);
/*
**************************************************
*
* 函数名:bspDotPrntCheckHP
*
* 功 能:穿孔打印机检测纸状态触发信号
*
* 输 入:无
*
* 输 出:g_ucprinterState
*
* 返 回:0------检测到有纸
* 1------检测到无纸
****************************************************
*/
INT1 bspDotPrntCheckPE(void);
/*
**************************************************
*
* 函数名:bspDotPrntCRStop
*
* 功 能:穿孔打印机CR电机停机
*
* 输 入:无
*
* 输 出:无
*
* 返 回:N/A
*
**************************************************
*/
void bspDotPrntCRStop(void);
/*
**************************************************
*
* 函数名:bspDotPrntPFStop
*
* 功 能:穿孔打印机进纸电机停机
*
* 输 入:无
*
* 输 出:无
*
* 返 回:N/A
*
**************************************************
*/
void bspDotPrntPFStop(void);
/*
**************************************************
*
* 函数名:bspDotPrntSetCurrentLevel
*
* 功 能:穿孔打印机CR电机和进纸电机电流等级选择
*
* 输 入:无
*
* 输 出:无
*
* 返 回:N/A
*
****************************************************
*/
void bspDotPrntSetCurrentLevel
(
UINT1 _ucCurrentLevel /* 驱动电流等级 */
);
/*
**************************************************
*
* 函数名:bspDotPrntPowerOn
*
* 功 能:穿孔打印机上电
*
* 输 入:无
*
* 输 出:无
*
* 返 回:N/A
*
**************************************************
*/
void bspDotPrntPowerOn(void);
/*
**************************************************
*
* 函数名:bspDotPrntPowerOff
*
* 功 能:穿孔打印机下电
*
* 输 入:无
*
* 输 出:无
*
* 返 回:N/A
*
**************************************************
*/
void bspDotPrntPowerOff(void);
/*
**************************************************
*
* 函数名:bspPrntPutDataToBuff
*
* 功 能:传送打印数据到缓冲区
*
* 输 入:无
*
* 输 出:s_ucprntBuffDataIn
* s_ucprntDataBuffer
*
* 返 回:SUCCESS-----处理成功
* FAULT-------数据越界(数据长度不超过80个)
*
****************************************************
*/
INT1 bspDotprntPutDataToBuff
(
UINT1 * _pAdrress, /* [in]数据起始地址 */
UINT1 _Lenth /* 数据长度 */
);
/*
****************************************************
*
* 函数名:bspDotprntPrintOneLine
*
* 功 能:穿孔机芯打印一行数据
*
* 输 入:g_ucPrntWidthAdjust
*
* 输 出:s_uiprntPatternCount
* g_ucprntLinePrinted
*
* 返 回:SUCESS----处理成功
*
*****************************************************
*/
INT1 bspDotprntPrintOneLine
(
UINT1 _ucDots /* 一个来回打印中间错开的点数 */
);
/*
*****************************************************
*
* 函数名:bspDotprntAndNewline
*
* 功 能:穿孔机芯打印并换行函数
*
* 输 入:g_ucprinterState
*
* 输 出:s_ucprntDataBuffer
* s_usprntPatternCount
*
* 返 回:FAULT 打印机故障
* SUCESS 打印成功
*
*****************************************************
*/
INT1 bspDotprntAndNewline
(
UINT1 _ucLine, /* 进纸行数*/
UINT1 _ucLineSpace /* 行间距 */
);
/*
****************************************************
*
* 函数名:bspPrntCheckBM
*
* 功 能:打印机黑标检测函数
*
* 输 入:s_usPrntBMCounter
*
* 输 出:g_ucprinterState
* g_ucprntCheckedBMark
* g_usprntPaperLen2
*
* 返 回:N/A
*
*****************************************************
*/
void bspPrntCheckBM
(
UINT1 _ucSelectPrinter /* 机芯选择 0 穿孔 1 热敏 */
);
/*
****************************************************
*
* 函数名:bspDotprntSetTimer
*
* 功 能:设置定时器定时时间
*
* 输 入:无
*
* 输 出:无
*
* 返 回:N/A
*
****************************************************
*/
void bspDotprntSetTimer
(
UINT4 _ucTimer /* 定时时间 */
);
/*
********************************************************
*
* 函数名:Delay350us
*
* 功 能: 打印出针定时函数
*
* 输 入:无
*
* 输 出:无
*
* 返 回:无
*
********************************************************
*/
void Delay350us(void);
/*
********************************************************
*
* 函数名:Delay135us
*
* 功 能: 打印收针定时函数
*
* 输 入:无
*
* 输 出:无
*
* 返 回:无
*
********************************************************
*/
void Delay135us(void);
/*
********************************************************
*
* 函数名:Delay115us
*
* 功 能: 打印收针定时函数
*
* 输 入:无
*
* 输 出:无
*
* 返 回:无
*
********************************************************
*/
void Delay115us(void);
/*
********************************************************
*
* 函数名:DelayXus
*
* 功 能: 针式打印走步相位变化定时函数
*
* 输 入:无
*
* 输 出:无
*
* 返 回:无
*
********************************************************
*/
void DelayXus
(
UINT2 _DelayTime /* 定时微秒值 us*/
);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -