예제 #1
0
        protected virtual void OnIRRemoteDataReceive(IRRemoteDataEventArgs e)
        {
            IRRemoteDataEventHandler handler = IRRemoteDataReceived;

            if (handler != null)
            {
                handler(this, e);
            }
        }
예제 #2
0
        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);
            }
        }