]> rtime.felk.cvut.cz Git - mf624-simulink.git/commit
Do not fail if mdlStart() cannot open /dev/uio0
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 23 Jul 2013 14:13:21 +0000 (16:13 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 23 Jul 2013 15:30:39 +0000 (17:30 +0200)
commit3b288601fc048d2410d695f795ac552eab000406
tree82759e7196917709aef192374501b3223af79d5f
parent8c37891979549998617ade62a7604367858ee70c
Do not fail if mdlStart() cannot open /dev/uio0

Such failing is inconvenient because mdlStart() is called even during
code generation [1]. If one tries to generate the code on a computer
without MF624 hardware, it fails.

This is solved that we ignore error in mdlStart(). When initialization
fails, we simply return from mdlStart() without reporing an error to the
user. The status of initialization is checked in every call to mdlOutputs()
and there the failres are already reported to the user.

[1] http://www.mathworks.com/matlabcentral/newsreader/view_thread/32986
mf624_SIMULINK.c
sfAnalogInput.c
sfAnalogOutput.c
sfDigitalOutput.c
sfReadPWM.c