To test a void function using import C/C++ option available in the simulink test manager. The c code contains a void function with a pointer to return the output. Since the function is void, there is no function identified at the import stage of the C/C++ import option, testing of the particular code cannot be done. How to overcome this issue?
Example code:
void SetDuty(int channel, int duty)
{
int newcml = 0;
int period = 1;
int *p ;
if (duty = 0)
{
newcml = 0;
}
else if (duty < 10)
{
newcml = ((duty * period) / 10);
}
else
{
newcml = period;
}
p=&newcml ;
}