Real-Time Workshop User's Guide | ![]() ![]() |
Building the MEX-File and the Driver Block
This section outlines how to build a MEX-file from your driver source code for use in Simulink. For full details on how to use mex
to compile the device driver S-function into an executable MEX-file, see External Interfaces in the MATLAB online documentation. For details on masking the device driver block, see "Using Masks to Customize Blocks" in Using Simulink.
mydriver
.c
type
mex
mydriver
.c
mex
builds mydriver
.dll
(PC) or mydriver
(UNIX).
mydriver
. The block is now bound to the mydriver
MEX-file.
![]() | Writing an Inlined S-Function Device Driver | Source Code for Inlined ADC Driver | ![]() |