Hope you are using Embedded coder with simulink coder (Real time workshop).
To change the model function prototype goto to Interface tab --
- Clear the checkbox Generate reusable code and click on Configure Functions button.
- Set the Function specification --> Model specific C prototype.
- Enter function name --> foobar and click on Get Default Configuration button. A function argument table will appear.
- For all the ports select category --> Value.
Note that, if you has multiple outputs from the mode l, as C language fundamental only one output can be taken as function return argument.