Calling coder.ceval with external variable as one of the arguments
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have a model with a MATLAB system block used for generating custom c-code. In my external C-code, I have a global variable called "buffer", which is an array of 8 bytes. In the step function I want to be able to copy a portion of the data from "buffer" to the output of the function (see below). Is there a way to declare the fact that "buffer" is an external variable?
function y = stepImpl(obj)
y = uint32(0)
if( coder.target('Rtw') )
coder.ceval('memcpy', coder.ref(y), coder.ref(buffer(2)), uint8(4))
end
end
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Coordinate Transformations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!