Re: serial port communication qestion...



On Aug 24, 12:31 am, Lew Pitcher <lpitc...@xxxxxxxxxxxx> wrote:
On Aug 22, 7:17 pm, cooper...@xxxxxxxxx wrote:

hi everyone,

i am a beginner of pascal language. nowadays, i am learning to deal
withserialport.
i found some examples, such as openingport, writing toport:

eg.
//SerSetParams(MySerialHandle, 9600,8,EvenParity,1,[]);
//SerWrite(MySerialHandle, bffr,2);

my question is why the 'MySerialHandle' argument appears in these
command.
what is the purpose of this argument?

MySerialHandle is the unique "handle" returned from the open for theserialdevice. Remember, you can have more than oneserialdevice, so
there has to be a way to distinguish them. The "handle" is just the
way the code distinguishes between openedserialdevices.

thank Lew, your explanation is very clear.

thanks again :)

.



Relevant Pages

  • Re: serial port communication qestion...
    ... i found some examples, such as openingport, writing toport: ... command. ... what is the purpose of this argument? ... MySerialHandle is the unique "handle" returned from the open for theserialdevice. ...
    (comp.os.linux.hardware)
  • Re: serial port communication qestion...
    ... i found some examples, such as openingport, writing toport: ... command. ... what is the purpose of this argument? ... MySerialHandle is the unique "handle" returned from the open for theserialdevice. ...
    (comp.os.linux.hardware)
  • [RFC: 2.6 patch] remove the broken SCSI_ACORNSCSI_3 driver
    ... * Abandoned using the Select and Transfer command since there were ... Once debugged, remove the #undef, otherwise to debug, ... -unsigned int dmac_address ... * Purpose: differentiate between commands that have a DATA IN phase ...
    (Linux-Kernel)
  • Re: Looking for the name on a concept AKA Do "reverse data loggers" exist?
    ... I am thinking about building a small robot but since any change is ... I ask this because the statement "any change is command ... steps will be rare" sounds like you have a very specific purpose in mind. ...
    (comp.robotics.misc)
  • [PATCH] scsi: Scsi_Cmnd convertion in arm subtree
    ... Purpose: complete processing for command ... Params: ... queue a command for adapter to process. ...
    (Linux-Kernel)