Recent

Author Topic: TLazSerial : serial port component for Lazarus (windows and linux).  (Read 409734 times)

tetrastes

  • Hero Member
  • *****
  • Posts: 754
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #525 on: February 10, 2026, 03:39:07 pm »
Do you want to apply the changes in the latest .7z and upload a new one?
Or I can do it, but the chance of making an error increases.
Of course you can. Just in case, I attach lazsynaser-new.pas also.

Quote
There are also some pull requests, I wonder if I shall apply them:
https://github.com/JurassicPork/TLazSerial/pulls
It's up to you to decide.

Quote
If I remeber (some of) these from lazsynaser.pas also have different names:

Code: Pascal  [Select][+][-]
  1.   dcb_Binary = $00000001;
  2.   dcb_ParityCheck = $00000002;
  3.   dcb_OutxCtsFlow = $00000004;
  4.   dcb_OutxDsrFlow = $00000008;
  5.   dcb_DtrControlMask = $00000030;
  6.   dcb_DtrControlDisable = $00000000;
  7.   dcb_DtrControlEnable = $00000010;
  8.   dcb_DtrControlHandshake = $00000020;
  9.   dcb_DsrSensivity = $00000040;
  10.   dcb_TXContinueOnXoff = $00000080;
  11.   dcb_OutX = $00000100;
  12.   dcb_InX = $00000200;
  13.   dcb_ErrorChar = $00000400;
  14.   dcb_NullStrip = $00000800;
  15.   dcb_RtsControlMask = $00003000;
  16.   dcb_RtsControlDisable = $00000000;
  17.   dcb_RtsControlEnable = $00001000;
  18.   dcb_RtsControlHandshake = $00002000;
  19.   dcb_RtsControlToggle = $00003000;
  20.   dcb_AbortOnError = $00004000;
  21.   dcb_Reserveds = $FFFF8000;    
These are from Win32 API https://learn.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-dcb.

Quote
Maybe some of these:
https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddser/ns-ntddser-_serial_handflow
I don't think there is any need in Windows Drivers API, but again, it's up to you to decide. This is your fork of LazSerial now.  ;)
 

CM630

  • Hero Member
  • *****
  • Posts: 1641
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #526 on: February 10, 2026, 09:14:56 pm »
Of course you can. Just in case, I attach lazsynaser-new.pas also.
Applied and attached.

I don't think there is any need in Windows Drivers API, but again, it's up to you to decide. This is your fork of LazSerial now.  ;)
For people like me, which know nothing about serial communication, it is better to be able to get the connection properties from the sniffer and apply it.
I understand nothing about DTR, RTS, parity, etc. As long as I need to connect a device to the PC, I have to reproduce what it expects, the connection parameters are already selected by someone else.
 The changes I made in TLazSerial are related to port listing, the only exception is that I added selectable baudrate.

This is your fork of LazSerial now.  ;)
I do hope that @JP is not gone forever.

EDIT: I added some info in the wiki: https://wiki.freepascal.org/Hardware_Access#TLazSerial
EDIT2: Uploaded a new version, .ShowSetupDialog was not working. Also added an Arduino sample for Test1.
« Last Edit: February 17, 2026, 09:08:11 am by CM630 »
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

 

TinyPortal © 2005-2018