Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

2 level matlab s-function

7 visualizzazioni (ultimi 30 giorni)
Ivan Maslennikov
Ivan Maslennikov il 26 Mag 2019
Chiuso: MATLAB Answer Bot il 20 Ago 2021
Hello! The issue i faced is what type of s-function i need to use, if i want to create drivers for hardware board. I have all necessary code for hardware board and i've already used legacy code tool before, but now i want to understand handwritten s-function. Here i found guide about s-functions, and i'm interested in first type (matlab .m s functions), because they do not need to use C code. I've created configuration block for board peripherals with input parameters and create TLC for code generation, but now i want to create functions like digital read/write, and i cannot understand, could i use that type of s function to create it? I look at generated by legacy code tool s functions and see hardware specific function prototypes of my c code in mdlstart and mdloutputs methods, and i can't understand how to implement it in .m 2 level s-function in outputs and start methods. Could i leave that methods empty and write hardware specific code only in TLC file?

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by