Code covered by the BSD License  

Highlights from
cport

  • cportclose; function stat=cportclose(H) closes an open serial or parallel port
  • cportconfig; function stat=cportconfig(H,Name,Value,Name,Value,Name,Value...)
  • cportgetchar; function Params[ch,err]=cportstate(H,nchar) retrieves characters from a
  • cportopen; function H=cportopen(Port) opens a serial or parallel communication port
  • cportpurge; function stat=cportpurge(H) discards all characters from the output or
  • cportreset; function [stat,ErrStr]=cportreset(H) resets a previously opened communications
  • cportstate; function Params=cportstate(H) retrieves the configuration and timeout
  • cportwrite; function nW=cportwrite(H,Data,EOL) sends data to a previously opened
  • s=cportgetline(H,nMax,EOL,Tim... function s=cportgetline(H,nMax,EOL,Timeout) reads in one line of character
  • Contents.m
  • View all files
from cport by Eyal Doron
The CPORT minitoolbox supplies basic functions to open, configure, read from,etc to ports.

Contents.m
% CPORT minitoolbox, version 1.1
%
% The CPORT minitoolbox supplies basic functions to open, configure, read
% from and write to serial and parallel ports under Microsoft Windows 95/98
% and (maybe) NT. The toolbox is implemented using a series of MEX files and
% M files. Requires Windows95/98/NT and Matlab 5+ (tested on Win95+5.2).
%
% Included functions:
% -------------------
%     cportopen    - opens a serial or parallel port for use.
%     cportconfig  - returns/modifies the configuration of a port.
%     cportwrite   - writes characters to a port.
%     cportgetchar - reads characters from a port.
%     cportgetline - reads an entire character line from a port.
%     cportreset   - resets a port, retrieves error codes and strings and 
%                    flushes its buffers.
%     cportclose   - closes an open port.
%
% C sources are also included, as well as .DLL files compiled under 
% Windows95 using the GCC+RSXNT compiler and development tools. Compilation
% was done according to the batch and configuration files developed by Juergen 
% Bausa (bausa@lfpt.rwth-aachen.de or Juergen.Bausa@T-Online.de). These files
% can be found in the archive RSXMEX.ZIP, available on the Mathworks web server.
%
% The minitoolbox is released into the public domain. Do with it as you will.
%
% Eyal Doron, doron@remon-medical.co.il, July 1999


Contact us at files@mathworks.com