Real-Time Workshop | ![]() ![]() |
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/API 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
mydriver
. The block is now bound to the mydriver
MEX-file.
![]() | Writing an Inlined S-Function Device Driver | Source Code for Inlined ADC Driver | ![]() |