Slave Control API > BS2_SetSlaveDevice
Add/Modify/Delete a slave device from the master device.
#include "BS_API.h" int BS2_SetSlaveDevice(void* context, uint32_t deviceId, BS2Rs485SlaveDevice* slaveDevices, uint32_t slaveDeviceCount);
context
: ContextdeviceId
: Device IDslaveDevices
: List of slave devicesslaveDeviceCount
: Number of slave devices
If successfully done, BS_SDK_SUCCESS
will be returned.
If there is an error, the corresponding error code will be returned.