fix: 修复i2c发送数据包错误的问题
This commit is contained in:
@@ -454,13 +454,11 @@ public class UDPClientPool
|
||||
{
|
||||
// Sperate Data Array
|
||||
var isLastData = i == writeTimes - 1;
|
||||
var sendDataArray =
|
||||
isLastData ?
|
||||
var sendDataArray = isLastData ?
|
||||
dataArray[(i * (256 * (32 / 8)))..] :
|
||||
dataArray[(i * (256 * (32 / 8)))..((i + 1) * (256 * (32 / 8)))];
|
||||
|
||||
// Write Jtag State Register
|
||||
opts.BurstLength = ((byte)(sendDataArray.Length / 4 - 1));
|
||||
opts.BurstLength = ((byte)Math.Min(sendDataArray.Length / 4 - 1, 1));
|
||||
ret = await UDPClientPool.SendAddrPackAsync(endPoint, new SendAddrPackage(opts));
|
||||
if (!ret) return new(new Exception("Send 1st address package failed!"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user