1 Star 0 Fork 2

城meto/ohpart_gen_code

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
config.json 1.67 KB
一键复制 编辑 原始数据 按行查看 历史
城meto 提交于 2023-04-06 17:00 . 修改代码模板风格
{
"attributes":{
"relate_path":"//foundation/communication/serial",
"subsys_name":"communication",
"namespace":"SwanLink",
"part_name":"serial",
"key_word":"serial",
"description":"串口通信",
"service_id":"COMMUNICATION_SERIAL_SERVICE_ID(30050)",
"adapted_system":"standard"
},
"memory":{
"rom":"",
"ram":""
},
"typedef":[
{"type":"struct","def":"SerialPort","values":[
]},
{
"type":"enum","def":"SERIAL_PARITY","values":[
{"def":"SERIAL_PARITY_NONE","value":0,"note":"无校验"},
{"def":"SERIAL_PARITY_ODD","value":1,"note":"奇校验"},
{"def":"SERIAL_PARITY_EVEN","value":2,"note":"偶校验"}
]
},
{
"type":"enum","def":"SERIAL_STOPBIT","values":[
{"def":"SERIAL_STOPBIT_1","value":0,"note":"停止位1bit"},
{"def":"SERIAL_STOPBIT_1P5","value":1,"note":"停止位1.5bit"},
{"def":"SERIAL_STOPBIT_2","value":2,"note":"停止位2bit"}
]
}
],
"property":[
{"type":"int","method":"SerialOpen","params":["const char *com"],"note":"打开串口"},
{"type":"void","method":"SerialClose","params":["int fd"],"note":"关闭串口"},
{"type":"int","method":"SerialWrite","params":["int fd","char *buf","int len"],"note":"写数据"},
{"type":"int","method":"SerialRead","params":["int fd","char *buf:out","int maxLen"],"note":"读数据"},
{"type":"bool","method":"SerialSetConfig","params":["int fd","const SerialPort &serial"],"note":"设置参数"},
{"type":"int","method":"SerialGetLastError","params":["int fd","char err[]:out"],"note":"获取错误信息"},
{"type":"bool","method":"SerialCanRead","params":["int fd","int timeout"],"note":"是否有可读的数据"}
]
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/meto475/ohpart_gen_code.git
git@gitee.com:meto475/ohpart_gen_code.git
meto475
ohpart_gen_code
ohpart_gen_code
master

搜索帮助