public static void ExitServiceMode(this MTRFXXAdapter adapter) { adapter.SendCommand(MTRFXXMode.Service, MTRFXXAction.SendCommand, 0, MTRFXXCommand.None); }
public static void ClearChannel(this MTRFXXAdapter adapter, byte channel) { adapter.SendCommand(MTRFXXMode.RX, MTRFXXAction.ClearChannel, channel, MTRFXXCommand.None); }
public static void ClearAllChannels(this MTRFXXAdapter adapter) { adapter.SendCommand(MTRFXXMode.RX, MTRFXXAction.ClearAllChannels, 0, MTRFXXCommand.None, MTRFXXRepeatCount.NoRepeat, MTRFXXDataFormat.NoData, new byte[] { 170, 85, 170, 85 }); }
public static void BindStop(this MTRFXXAdapter adapter) { adapter.SendCommand(MTRFXXMode.RX, MTRFXXAction.StopBinding, 0, MTRFXXCommand.None); }
public static void BindStart(this MTRFXXAdapter adapter, byte channel) { adapter.SendCommand(MTRFXXMode.RX, MTRFXXAction.StartBinding, channel, MTRFXXCommand.None); }
private static void SendData(MTRFXXAdapter adapter, MTRFXXCommand command, bool useFMode, byte channel, UInt32?deviceId, MTRFXXDataFormat format, params byte[] data) { var ma = GetModeAndAction(useFMode, deviceId); adapter.SendCommand(ma.Item1, ma.Item2, channel, command, MTRFXXRepeatCount.NoRepeat, format, data, deviceId ?? 0); }
private static void SendReadState(this MTRFXXAdapter adapter, byte channel) { adapter.SendCommand(MTRFXXMode.TXF, MTRFXXAction.SendCommand, channel, MTRFXXCommand.ReadState); }
private static void Send(MTRFXXAdapter adapter, MTRFXXCommand command, bool useFMode, byte channel = 0, UInt32?deviceId = null) { var ma = GetModeAndAction(useFMode, deviceId); adapter.SendCommand(ma.Item1, ma.Item2, channel, command, target: deviceId ?? 0); }