/// <summary> /// Attaching a SPI bus. /// </summary> /// <param name="bus"></param> public void AttachSpiBus(SpiBus bus) { // Making sure that the bus is not allready in use. if (bus.AttachedDevice != null) { throw new InvalidOperationException($"Bus {bus} is already in use and cannot be used on a other strip until detached."); } bus.AttachDevice(this); SpiBus = bus; }
/// <summary> /// Detacheds the spi bus. /// </summary> public void DetachedSpiBus() { SpiBus.DetachDevice(); SpiBus = null; }