Bugfix/dlmstp api missing in ports os (#1003)
* Added missing API defined in header into ports/win32/dlmstp.c module, added a PDU queue and refactored receive thread, and refactored MS/TP timing parameters. * Added missing API defined in header into ports/linux/dlmstp.c module, and refactored MS/TP timing parameters. * Added missing API defined in header into ports/bsd/dlmstp.c module, and refactored MS/TP timing parameters. * Reduce default MS/TP APDU to 480 to avoid extended frames by default.
This commit is contained in:
@@ -573,9 +573,7 @@ uint8_t dlmstp_max_info_frames(void)
|
||||
void dlmstp_set_max_master(uint8_t max_master)
|
||||
{
|
||||
if (max_master <= 127) {
|
||||
if (MSTP_Port->This_Station <= max_master) {
|
||||
MSTP_Port->Nmax_master = max_master;
|
||||
}
|
||||
MSTP_Port->Nmax_master = max_master;
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -957,7 +955,8 @@ void dlmstp_fill_statistics(struct dlmstp_statistics *statistics)
|
||||
return;
|
||||
}
|
||||
if (statistics) {
|
||||
*statistics = user->Statistics;
|
||||
memmove(
|
||||
statistics, &user->Statistics, sizeof(struct dlmstp_statistics));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user