Request #28 - fix for Flush on FPC-Android
git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@268 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
parent
ad10668180
commit
b4146c13c0
13
synaser.pas
13
synaser.pas
@ -1,9 +1,9 @@
|
|||||||
{==============================================================================|
|
{==============================================================================|
|
||||||
| Project : Ararat Synapse | 007.007.000 |
|
| Project : Ararat Synapse | 007.007.001 |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Content: Serial port support |
|
| Content: Serial port support |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Copyright (c)2001-2022, Lukas Gebauer |
|
| Copyright (c)2001-2023, Lukas Gebauer |
|
||||||
| All rights reserved. |
|
| All rights reserved. |
|
||||||
| |
|
| |
|
||||||
| Redistribution and use in source and binary forms, with or without |
|
| Redistribution and use in source and binary forms, with or without |
|
||||||
@ -33,7 +33,7 @@
|
|||||||
| DAMAGE. |
|
| DAMAGE. |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
||||||
| Portions created by Lukas Gebauer are Copyright (c)2001-2021. |
|
| Portions created by Lukas Gebauer are Copyright (c)2001-2023. |
|
||||||
| All Rights Reserved. |
|
| All Rights Reserved. |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Contributor(s): |
|
| Contributor(s): |
|
||||||
@ -2004,10 +2004,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBlockSerial.Flush;
|
procedure TBlockSerial.Flush;
|
||||||
|
var
|
||||||
|
Data : Integer;
|
||||||
begin
|
begin
|
||||||
{$IFNDEF MSWINDOWS}
|
{$IFNDEF MSWINDOWS}
|
||||||
{$IFDEF ANDROID}
|
{$IFDEF ANDROID}
|
||||||
|
Data := 1;
|
||||||
|
{$IFNDEF FPC}
|
||||||
ioctl(FHandle, TCSBRK, 1);
|
ioctl(FHandle, TCSBRK, 1);
|
||||||
|
{$ELSE}
|
||||||
|
FpIOCtl(FHandle, TCSBRK, @Data);
|
||||||
|
{$ENDIF}
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
SerialCheck(tcdrain(FHandle));
|
SerialCheck(tcdrain(FHandle));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user