Added MS/TP automatic baudrate detection option into the core MS/TP state machine. (#900)
This commit is contained in:
@@ -102,6 +102,7 @@ int main(void)
|
||||
MSTP_Port.ZeroConfigEnabled = true;
|
||||
MSTP_Port.Zero_Config_Preferred_Station = 0;
|
||||
MSTP_Port.SlaveNodeEnabled = false;
|
||||
MSTP_Port.CheckAutoBaud = false;
|
||||
/* user data */
|
||||
MSTP_User_Data.RS485_Driver = &RS485_Driver;
|
||||
MSTP_Port.UserData = &MSTP_User_Data;
|
||||
@@ -113,8 +114,10 @@ int main(void)
|
||||
/* FIXME: get the address from hardware DIP or from EEPROM */
|
||||
dlmstp_set_mac_address(1);
|
||||
}
|
||||
/* FIXME: get the baud rate from hardware DIP or from EEPROM */
|
||||
dlmstp_set_baud_rate(DLMSTP_BAUD_RATE_DEFAULT);
|
||||
if (!MSTP_Port.CheckAutoBaud) {
|
||||
/* FIXME: get the baud rate from hardware DIP or from EEPROM */
|
||||
dlmstp_set_baud_rate(DLMSTP_BAUD_RATE_DEFAULT);
|
||||
}
|
||||
/* initialize application layer*/
|
||||
bacnet_init();
|
||||
for (;;) {
|
||||
|
||||
Reference in New Issue
Block a user