22.5.3.4 PINIT(自定义函数)

完成的脚本

_strset(databuf0, "") //清除数据缓冲器0。
_strset(databuf0, 0x1B) //设置ASCII代码"ESC"。
_strset(databuf1, "") //清除数据缓冲器1。
_strset(databuf1, 0x40) //设置ASCII代码"@"。
_strcat(databuf0, databuf1) //将数据缓冲器1附加到数据缓冲器0结束。
_strlen([t:0000], databuf0) //将数据长度保存到临时地址。
//将数据发送到串口端口。
IO_WRITE_EX([p:EXT_SIO], databuf0, [t:0000]) //从缓冲器0中发送临时数据指示的数量。

函数摘要

初始化打印机。向打印机发送ESC/P命令“ESC+@”。