* its associated macro definitions.
*/
#include "simstruc.h"
+
+#ifndef WITHOUT_HW
#include "mf624_SIMULINK.h"
+#endif /*WITHOUT_HW*/
/* Error handling
* --------------
*/
static void mdlStart(SimStruct *S)
{
+ #ifndef WITHOUT_HW
if (mf624_init(NULL) != 0)
return;
DAC_enable(mfst);
+ #endif /*WITHOUT_HW*/
//ssSetPWorkValue(S, 0, mfst);
}
#endif /* MDL_START */
//mf624_state_t* mfst = ssGetPWorkValue(S,0);
int out;
+ #ifndef WITHOUT_HW
if (mf624_check(S) != 0)
return;
out = (int) ((u[0] + 10) * 8192 / 10 + 0.5);
}
mf624_write16(out, MFST2REG(mfst, 2, dac_channel2reg[(int)CHNL_PRM(S)-1]));
+ #endif /*WITHOUT_HW*/
}
*/
static void mdlTerminate(SimStruct *S)
{
+ #ifndef WITHOUT_HW
//mf624_state_t* mfst = ssGetPWorkValue(S,0);
if (mf624_check(NULL) != 0)
return;
MFST2REG(mfst, 0, GPIOC_reg));
mf624_done();
+ #endif /*WITHOUT_HW*/
}