configureCallback
Set callback function and trigger condition for communication with serial port device
Syntax
Description
configureCallback(
sets the callback function referred to by the handle device
,"terminator",callbackFcnHdl
)callbackFcnHdl
to
trigger whenever a terminator is available to be read from the specified serial port. The
syntax sets the BytesAvailableFcnMode
property of
device
to "terminator"
and the
BytesAvailableFcn
property to
callbackFcnHdl
.
Set the terminator character using configureTerminator
.
configureCallback(
sets the function referred to by the handle device
,"byte",count
,callbackFcnHdl
)callbackFcnHdl
to trigger
whenever a new count
number of bytes are available to be read. The
syntax sets the BytesAvailableFcnMode
property of
device
to "byte"
, the
BytesAvailableFcnCount
property to count
, and
the BytesAvailableFcn
property to
callbackFcnHdl
.
Examples
Input Arguments
Version History
Introduced in R2019b