Ejemplo n.º 1
0
        /// <summary>
        /// Creates transfer buffers for <paramref name="numberOfMessages"/>.
        /// </summary>
        /// <param name="numberOfMessages">The number of messages to send.</param>
        /// <param name="messageSizeInBytes">Message size in bytes.</param>
        /// <param name="transferMode">The transfer mode.</param>
        /// <returns>The requested transfer buffer collection.</returns>
        public ISpiTransferBufferCollection CreateTransferBufferCollection(int numberOfMessages, int messageSizeInBytes, SpiTransferMode transferMode)
        {
            var collection = new SpiTransferBufferCollection(numberOfMessages, messageSizeInBytes, transferMode);

            foreach (var transferBuffer in collection)
            {
                transferBuffer.BitsPerWord = bitsPerWord;
                transferBuffer.Delay       = delay;
                transferBuffer.Speed       = maxSpeed;
            }
            return(collection);
        }
 /// <summary>
 /// Creates transfer buffers for <paramref name="numberOfMessages"/>.
 /// </summary>
 /// <param name="numberOfMessages">The number of messages to send.</param>
 /// <param name="messageSizeInBytes">Message size in bytes.</param>
 /// <param name="transferMode">The transfer mode.</param>
 /// <returns>The requested transfer buffer collection.</returns>
 public ISpiTransferBufferCollection CreateTransferBufferCollection(int numberOfMessages, int messageSizeInBytes, SpiTransferMode transferMode)
 {
     var collection = new SpiTransferBufferCollection(numberOfMessages, messageSizeInBytes, transferMode);
     foreach (var transferBuffer in collection) {
         transferBuffer.BitsPerWord = bitsPerWord;
         transferBuffer.Delay = delay;
         transferBuffer.Speed = maxSpeed;
     }
     return collection;
 }