Hello,
I have task1 calling functionA. what’s the difference between the 2 following cases of fucntionA
~~~~~~
Taks1()
{
for(;;)
{
functionA();
}
}
~~~~~~
case 1
~~~~~~
functionA()
{
char* pBuffer;
pBuffer = pvPortMalloc(100);
{
// process data,
//pBuffer is always used when calling functionA
}
pPortFree(pBuffer );
}
~~~~~~
case 2
~~~~~~
functionA()
{
Buffer[60];
// process data,
// buffer is always used when calling functionA
}
~~~~~~
If taskA is pre-empted by a higher priority task, Will task1 save the variables of fucntionA ?
What is the best function to use ?
Thank you