Changeset 163 for PinConnection/USerialPort.pas
- Timestamp:
- Feb 8, 2011, 11:02:02 AM (13 years ago)
- Location:
- PinConnection
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
PinConnection
- Property svn:ignore
-
old new 1 1 lib 2 backup
-
- Property svn:ignore
-
PinConnection/USerialPort.pas
r129 r163 6 6 7 7 uses 8 Classes, SysUtils, SynaSer, StdCtrls, Dialogs, UCommon; 8 Classes, SysUtils, SynaSer, StdCtrls, Dialogs, UCommon, UMicroThreading, 9 DateUtils; 9 10 10 11 type … … 22 23 { TSerialPortReceiveThread } 23 24 24 TSerialPortReceiveThread = class(T Thread)25 TSerialPortReceiveThread = class(TMicroThread) 25 26 public 26 27 Parent: TSerialPort; … … 154 155 FReceiveThread.FreeOnTerminate := False; 155 156 FReceiveThread.Parent := Self; 157 FReceiveThread.Name := 'SerialPort'; 156 158 FReceiveThread.Start; 157 159 end; … … 290 292 InBufferUsed := 0; 291 293 with Parent do repeat 292 try293 if InBufferUsed = 0 then Sleep(1);294 if InBufferUsed = 0 then MTSleep(1 * OneMillisecond) 295 else Yield; 294 296 if Active then begin 295 297 InBufferUsed := WaitingData; … … 305 307 end else InBufferUsed := 0; 306 308 end else InBufferUsed := 0; 307 except308 on E: Exception do309 if Assigned(ExceptionHandler) then ExceptionHandler(Self, E);310 end;311 309 until Terminated; 312 310 end;
Note:
See TracChangeset
for help on using the changeset viewer.