2022-09-29 02:03 AM
I am calling setVerbosityLevel of the API with CUBEPROGRAMMER_VER_LEVEL_NONE (0) in the C++ USB Example project supplied but the DLL routines (like connectDfuBootloader) are still outputting messages. Still there any way to stop these messages?
Solved! Go to Solution.
2022-10-03 03:04 AM
Hello @MSSloan1962,
A way to do this would be to define your own function that displays messages (or doesn't). You can for example define the following function in DisplayManager.cpp (also don't forget to add the prototype in DisplayManager.h)
void DisplayMessageOff(int msgType, const wchar_t* str)
{
return;
}
Then set it as the logMessage function in your displayCallBacks instance (in main.c) :
displayCallBacks vsLogMsg;
vsLogMsg.logMessage = DisplayMessageOff;
The problem with this is that the function is called each time there's a message, it just doesn't display it. So I recommend keeping the verbosity level at 0 to reduce the number of calls.
Also, it seems that you're using an old version of the API, I suggest you use the latest version (with CubeProgrammer v2.11).
I hope you find this helpful.
Aziz
2022-10-03 03:04 AM
Hello @MSSloan1962,
A way to do this would be to define your own function that displays messages (or doesn't). You can for example define the following function in DisplayManager.cpp (also don't forget to add the prototype in DisplayManager.h)
void DisplayMessageOff(int msgType, const wchar_t* str)
{
return;
}
Then set it as the logMessage function in your displayCallBacks instance (in main.c) :
displayCallBacks vsLogMsg;
vsLogMsg.logMessage = DisplayMessageOff;
The problem with this is that the function is called each time there's a message, it just doesn't display it. So I recommend keeping the verbosity level at 0 to reduce the number of calls.
Also, it seems that you're using an old version of the API, I suggest you use the latest version (with CubeProgrammer v2.11).
I hope you find this helpful.
Aziz
2022-10-04 12:04 AM
Thanks. Most helpful. :)