adigostin/mstp-lib

DebugStrOut - flush parameter type differs in declaration,documentation and usages

Opened this issue · 1 comments

In stp.h flush parameter is uint:

typedef void  (*STP_CALLBACK_DEBUG_STR_OUT)  (const struct STP_BRIDGE* bridge, int portIndex, int treeIndex, const char* nullTerminatedString, unsigned int stringLength, unsigned int flush);

In documentation StpCallback_DebugStrOut.html flush is bool type.

All usages inside stp_log.cpp provide true/false as flush argument

Thanks for reporting this. It will be fixed in a 3.0, when I will change all types to those from stdint.h and stdbool.h.

(When I started working on this library, it had to work on IAR 5.x and have a C-only interface; back then IAR had some issues with stdint.h, that's why I limited myself to types built into the C language; things got messy later when I had to support GCC 6.x and clang.)