module1.bas
来自「飞思卡尔的键盘中断源代码,C语言写的,很不错的」· BAS 代码 · 共 16 行
BAS
16 行
Attribute VB_Name = "Module1"
Rem 串行口初始化
Public Sub SCIinit(Msc1 As MSComm, ByVal COMx As Byte, ByVal SCIFormat As String)
If Msc1.PortOpen = True Then
Ms1.PortOpen = False
End If
Msc1.CommPort = COMx '串行口号
Msc1.Settings = SCIFormat '定义传输格式
Msc1.InputMode = comInputModeBinary '二进制数据格式
Msc1.RThreshold = 0 '关闭串行中断
Msc1.InputLen = 2 '一次读取缓冲区全部数据
Msc1.PortOpen = True '打开串行口
Msc1.InBufferCount = 0
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?