Slave Control API > BS2_SetSlaveBaudrate


[+ 2.9.8] Set the RS-485 baud rate of a slave device connected to a master device.
To reconnect with the slave, the RS-485 baud rate of the master device must also be changed to match the baud rate of the slave.

Declaration

#include "BS_API.h"
 
int BS2_SetSlaveBaudrate(IntPtr context, UInt32 deviceId, UInt32 slaveId, UInt32 baudrate);

Parameter

  • [In] context : Context
  • [In] deviceId : Device ID
  • [In] slaveId : Slave device ID
  • [In] baudrate : RS-485 baud rate

Return Value

If successfully done, BS_SDK_SUCCESS will be returned.
If there is an error, the corresponding error code will be returned.