埠是erlang與外部程式通訊的一種方式。
下圖展現了埠與外部程式互動的方式。
otp 常用的介面函式:
1、 開啟埠
open_port/2
2、 通過埠,向外部程式傳送資料
port_command
3、 通過埠,從外部程式接收資料
recieve
end.
4、 關閉埠
port_close/0
"write an erlang port using otp principles" 這篇文章,詳細講解了如何通過otp來編寫乙個埠應用,並通過這個應用來與外部的程式通訊。
**在這裡:
通過IO埠讀取外部資料,帶中斷
基於fl2440開發板,核心版本2.6.28 主機平台 ubuntu 11.04 核心版本2.6.39 驅動 include include include include include include 設定中斷方式 include include include include include ...
通過IO埠讀取外部資料,帶中斷
基於fl2440開發板,核心版本2.6.28 主機平台 ubuntu 11.04 核心版本2.6.39 驅動 include include include include include include 設定中斷方式 include include include include include ...
通過IO埠讀取外部資料,帶中斷
基於fl2440開發板,核心版本2.6.28 主機平台 ubuntu 11.04 核心版本2.6.39 驅動 include include include include include include 設定中斷方式 include include include include include ...