Is there a way to make C functions in VxWorks uncallable from the VxWorks console?
I know setting the function to static would work, but I also need the function to be called from outside its source file.
Example
SpeakerDiagnostics.h
extern void reportSpeakerError(int error);
SpeakerDiagnostics.c
static int errorBitMask = 0;
void reportSpeakerError(int error)
{
errorBitMask |= error;
}
Diagnostics.c
#include "SpeakerDiagnostics.h"
void checkSpeaker()
{
int broken = 0x1;
//some code
if (some error check fails)
{
reportSpeakerError(broken);
}
}
You need to sign in to view this answers