📄 outport.c
字号:
#include "mex.h"
#include "conio.h"
void mexFunction( int nlhs, mxArray *plhs[],
int nrhs, const mxArray*prhs[] )
{
unsigned short port;
unsigned char ch;
double *ptr;
if (nrhs != 2)
mexErrMsgTxt("Need two parameters\n");
if (!mxIsNumeric(prhs[0]))
mexErrMsgTxt("Port should be numeric\n");
if (!mxIsNumeric(prhs[1]))
mexErrMsgTxt("Byte should be numeric\n");
ptr = mxGetPr(prhs[0]);
port = (unsigned short) (*ptr);
ptr = mxGetPr(prhs[1]);
ch = (unsigned char ) (*ptr);
_outp(port, ch);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -