• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 
April 25, 2024, 08:51:54 am

News:

SMF - Just Installed!


NrUsbPipe buffer limit

Started by zerondeau, March 02, 2011, 01:09:26 pm

Previous topic - Next topic

zerondeau

hi there ,

is there any particular raison why ReadbufferSize is limit to >= 128 ?
I'm using it with microchip Pic32 (buffer is normally at 64)
I will change my buffer size in microchip firmware no problem.

just to know why.

thanks and have a nice day!

Yves

version 9.15
file : nrUsbPipe.pas

   
procedure TnrUSBPipePair.ThreadExecute(aThread: TThread);

  sz := fReadBufferSize;
  if sz < 128 then sz := 128;


Roman Novgorodov

Hello

The small buffer increases CPU load.
Usual bulk buffer is 64, we selected double of this value.

This value does not disturb to read smaller length of input data.
If your device provides 1 byte of data, loop reads and processes 1 byte without waiting other 127 bytes.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.