protected virtual void OnIRRemoteDataReceive(IRRemoteDataEventArgs e) { IRRemoteDataEventHandler handler = IRRemoteDataReceived; if (handler != null) { handler(this, e); } }
private void IR_Int_ValueChanged(GpioPin sender, GpioPinValueChangedEventArgs args) { if (args.Edge == GpioPinEdge.RisingEdge) { byte[] remoteData = ReadRegister_FourBytes(IR_READ_NEC); IRRemoteDataEventArgs ea = new IRRemoteDataEventArgs(remoteData); OnIRRemoteDataReceive(ea); } }