ussp.txt: Userspace serial ports.
Introduction
------------
This driver allows serial port drivers to be written in userspace.
This will probably incur a bit over overhead, but I don't expect it to
be unusable. In fact, intelligent cards like "sx" already hold up
characters upto 20 ms before reporting them to the OS. It must be very
well possible to handle things faster than that.
This driver was written to allow access to the perle RAS server
products. It can easily be driven using a userspace deamon, while
interfacing with the kernel internals on the network level would be
harder.
Technical details
-----------------
The deamon opens the ussp_master device. It then uses the
USSP_SET_PORT ioctl to associate the filedescriptor with a port. From
that moment onward, the device is a "pipe" that transfers data between
the serial port and the kernel driver.
struct operation {
enum op;
unsigned long len;
unsigned long arg;
unsigned char data[];
};
Write: (kernel -> Userspace)
op = USSP_WRITE;
len = length of data.
data[] holds the data.
Read: (Userspace -> kernel)
op = USSP_READ;
len = length of data.
data[] holds the data.
set_termios: (kernel -> userspace)
op = USSP_SET_TERMIOS;
len = size of termios structure.
(userspace can return error on unsupported sizes).
data[] Termios structure.
modem_signal_change: (bidirectional)
/* Either side ignores the bits that are not setable */
op = USSP_MSC;
len = 0;
arg = the logical OR of:
DCD 0x01
RI 0x02
RTS 0x04
CTS 0x08
DTR 0x10
DSR 0x20
open: (kernel -> userspace)
op = USSP_OPEN;
len = 0;
arg = open flags;
open_ok: (userspace -> kernel)
op = USSP_OPEN_RESULT;
len = 0l
arg = result code (0 = OK, other = Errno);
close: (kernel -> userspace)
op = USSP_CLOSE;
len = 0;
zez
- 粉丝: 281
- 资源: 3
最新资源
- WebSocket:实时通信的利器-pdf
- WebSocket:实现实时网络通信的强大工具.pdf
- PMSM永磁同步电机参数辨识仿真,适用于表贴式,内嵌式永磁同步电机: 辨识内容: ① 定子电阻,精度在0.1%左右; ② DQ电感辨识(脉冲电压法),精度在0.02%左右; ③ 转子磁链辨识,精度在0
- WebSocket:推动实时网络通信的变革力量.pdf
- YUNYUNyun云云
- STM32开发的串口接收不定长数据源码, 可解决串口延时处理,数据丢失等适合串口传输大量数据,可移植性非常广,程序源码注释详细,非常适合开发人员,需要可以看下
- 130道Python基础练习题
- 电子科技大学ASIC作业参考
- 低成本NI实时仿真机刷机文件教程,包括机箱的配置,启动盘的生成,刷机教程等等,可用于跑CarSim模型和simulink实时模型,支持labview-rt和veristand-rt 文档资料
- java decompiler (java反编译工具)
- 毕业设计A049-基于Java的大学城水电管理系统的设计与实现
- MATLAB代码:基于条件风险价值CVaR的微网动态定价与调度策略 关键词:P2P交易 微网优化调度 条件风险价值 合作博弈 动态定价 参考文档:加好友获取 仿真平台:MATLAB yalmip+c
- 毕业设计B056-基于Java的班级回忆录的设计与实现
- 电机控制器,电动车电驱方案,主动阻尼控制,damping control,转矩补偿,振动、谐振抑制 公司多个量产实际项目中用的, matlab二质量模型… 使用巴特沃斯高通滤波器提取转速波动进行转矩补
- KPCA-ISSA-SVM分类预测,基于核主成分分析和改进的麻雀搜索算法优化支持向量机故障诊断分类预测,MATLAB代码(含SVM、SSA-SVM、ISSA-SVM、KPCA-ISSA-SVM四个模型
- linux常用命令大全笔记.md
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
- 1
- 2
前往页