Example #1
0
 public SX1276()
 {
     PropertyChanged += new PropertyChangedEventHandler(device_PropertyChanged);
     deviceName = "SX12xxEiger";
     usbDevice = new HidDevice(1146, 11, deviceName);
     usbDevice.Opened += new EventHandler(usbDevice_Opened);
     usbDevice.Closed += new EventHandler(usbDevice_Closed);
     Dio0Changed += new SX1276.IoChangedEventHandler(device_Dio0Changed);
     Dio1Changed += new SX1276.IoChangedEventHandler(device_Dio1Changed);
     Dio2Changed += new SX1276.IoChangedEventHandler(device_Dio2Changed);
     Dio3Changed += new SX1276.IoChangedEventHandler(device_Dio3Changed);
     Dio4Changed += new SX1276.IoChangedEventHandler(device_Dio4Changed);
     Dio5Changed += new SX1276.IoChangedEventHandler(device_Dio5Changed);
     PopulateRegisters();
 }
Example #2
0
        public SX1276LR()
        {
            PropertyChanged += new PropertyChangedEventHandler(device_PropertyChanged);

            deviceName = "SX12xxEiger";
            usbDevice = new HidDevice(0x047A, 0x000B, deviceName);

            usbDevice.Opened += new EventHandler(usbDevice_Opened);
            usbDevice.Closed += new EventHandler(usbDevice_Closed);

            Dio0Changed += new SX1276LR.IoChangedEventHandler(device_Dio0Changed);
            Dio1Changed += new SX1276LR.IoChangedEventHandler(device_Dio1Changed);
            Dio2Changed += new SX1276LR.IoChangedEventHandler(device_Dio2Changed);
            Dio3Changed += new SX1276LR.IoChangedEventHandler(device_Dio3Changed);
            Dio4Changed += new SX1276LR.IoChangedEventHandler(device_Dio4Changed);
            Dio5Changed += new SX1276LR.IoChangedEventHandler(device_Dio5Changed);

            PacketHandlerLog = (ILog)new PacketLog((IDevice)this);
            PacketHandlerLog.PropertyChanged += new PropertyChangedEventHandler(PacketHandlerLog_PropertyChanged);

            PopulateRegisters();
        }