outp, outpw, _outp, _outpw, _outpd

輸出,在埠、位元組(、)、單字( outpoutpw_outpw )或雙字( _outpd )。 _outp

重要

這些函式已被取代。 自 Visual Studio 2015 起,這些函式即無法在 CRT 中使用。
這個 API 不能用於在 Windows 執行階段中執行的應用程式。 如需詳細資訊,請參閱 CRT functions not supported in Universal Windows Platform apps (通用 Windows 平台應用程式中不支援的 CRT 函式)。

語法

int _outp(
   unsigned short port,
   int data_byte
);
unsigned short _outpw(
   unsigned short port,
   unsigned short data_word
);
unsigned long _outpd(
   unsigned short port,
   unsigned long data_word
);

參數

port
連接埠號碼。

data_byte, data_word
輸出值。

傳回值

這些函式會傳回資料輸出。 沒有傳回錯誤。

備註

_outp_outpw_outpd 函式會個別寫入一個位元組、一個字組及雙字組到指定的輸出連接埠。 自 port 變數可以是範圍 0 - 65,535 中的任何不帶正負號的整數。 data_byte 可以是範圍 0 - 255 中的任何整數。 data_word 可以是整數範圍中的任何值、不帶正負號的短整數,以及不帶正負號的長整數。

由於這些函式會直接寫入 I/O 埠,所以無法在使用者模式 Windows 程式碼中使用。

如需在 Windows 作業系統中使用 I/O 埠的相關資訊,請參閱 序列通訊

outpoutpw 名稱較舊、已被取代的 _outp_outpw 函式名稱。 如需詳細資訊,請參閱 POSIX 函式名稱

需求

常式 必要的標頭
_outp <conio.h>
_outpw <conio.h>
_outpd <conio.h>

如需相容性詳細資訊,請參閱相容性

程式庫

所有版本的 C 執行階段程式庫

另請參閱

主控台和埠 I/O
inp, inpw, _inp, _inpw, _inpd