コード例 #1
0
 public void Dispose()
 {
     if (this._isDisposed)
     {
         return;
     }
     this._isDisposed = true;
     LibMpsse.Cleanup();
 }
コード例 #2
0
        private void InitLibAndHandle()
        {
            if (_spiHandle != IntPtr.Zero)
            {
                return;
            }

            LibMpsse.Init();

            var result = CheckResult(LibMpsse_AccessToCppDll.SPI_OpenChannel(_ftdiMpsseChannelConfig.ChannelIndex, out _spiHandle));

            if (_spiHandle == IntPtr.Zero)
            {
                throw new SpiChannelNotConnectedException(FtdiMpsseSPIResult.InvalidHandle);
            }

            result        = CheckResult(LibMpsse_AccessToCppDll.SPI_InitChannel(_spiHandle, ref _spiConfig));
            _globalConfig = this._spiConfig;
        }