27 lines
639 B
C#
27 lines
639 B
C#
namespace Common.Hardware.SIRT.Tasks
|
|
{
|
|
public class WriteRegisterTask : SIRTTask
|
|
{
|
|
public WriteRegisterTask()
|
|
=> this.request.Command = SIRTConstants.W_REG;
|
|
|
|
public byte[] Payload
|
|
{
|
|
get => this.request.Payload;
|
|
set
|
|
{
|
|
this.request.Payload = value;
|
|
this.request.P2 = (byte)value.Length;
|
|
}
|
|
}
|
|
|
|
public override void Receive(SIRTMessage response)
|
|
{
|
|
if (response.Command == SIRTConstants.ACKN_ANSW)
|
|
{
|
|
this.SetCompleted();
|
|
}
|
|
}
|
|
}
|
|
}
|