C MEX interface for serial port.
Compatible with all software supporting C MEX API.
List of builtin availables
- getPortNames() returns a cell with available ports.
- id = openPort(port, baudrate [, databits [, stopbits, [parity,
[flowcontrol, [rtscontrol]]]]])
supported baud rate: 0, 50, 100, 110, 134, 150, 200, 300, 600, 1200, 1800,
2400, 4800, 9600, 19200, 38400, 115200, or 921600.
data bits: 5, 6, 7, or 8.
stop bits: 0 or 1.
parity: 'none', 'odd' or 'even'.
flowcontrol: 'none', 'hard' or 'soft'.
rtscontrol: 'none', 'hard', 'soft', or 'best'.
- [data, nbBytesReceived] = readPort(id, numBytesToRead) read data.
- writePort(id, data) write data on serial port. data must be uint8 or
char.
- closePort(id) closes an port opened.
- flushPort(id) flushs desired port.
- st = getPortConfig(id) returns struct with port informations.