public AdDaBoard(SpiDevice spiDevice) { _spiCommController = new SpiCommController(spiDevice); _ads1256SpiComm = _spiCommController.Create(AdDaBoardPins.Ads1256SpiChipSelectPinNumber); _dac8552SpiComm = _spiCommController.Create(AdDaBoardPins.Dac8552SpiChipSelectPinNumber); Input = new Ads1256(_ads1256SpiComm, AdDaBoardPins.Ads1256DataReadyPinNumber); Output = new Dac8552(_dac8552SpiComm); }
public Ads1256(ISpiComm spiComm, int dataReadyPinNumber) { SpiComm = spiComm; _dataReadyPin = GpioController.GetDefault().OpenPin(dataReadyPinNumber); _dataReadyPin.SetDriveMode(GpioPinDriveMode.InputPullUp); _currentRegisters = SpiComm.Operate(ReadRegisters); Gain = _currentRegisters.Gain; DataRate = _currentRegisters.DataRate; DetectCurrentSources = _currentRegisters.DetectCurrentSources; AutoSelfCalibrate = _currentRegisters.AutoCalibrate; UseInputBuffer = _currentRegisters.UseInputBuffer; }
public RegisterManager(ISpiComm spiComm, bool debugLog = false) { _spiComm = spiComm; _debugLog = debugLog; }
public Dac8552(ISpiComm spiComm) { SpiComm = spiComm; }