Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
947 B

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 03/09/2001
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: RS485.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of RS485.cpp
  13. //----------------------------------------------------------------------------
  14. #include "stdafx.h"
  15. #include "RS485.h"
  16. #ifdef _DEBUG
  17. #undef THIS_FILE
  18. static char THIS_FILE[] = __FILE__;
  19. #define new DEBUG_NEW
  20. #endif
  21. DWORD CConnectionRS485::Write( IN PBYTE pBuffer, IN DWORD dwSize, IN DWORD dwTimeout )
  22. {
  23. ::EscapeCommFunction( CConnectionRS232::GetCommPortHandle(), SETRTS );
  24. DWORD dwWritten = CConnectionRS232::Write( pBuffer, dwSize, dwTimeout );
  25. ::EscapeCommFunction( CConnectionRS232::GetCommPortHandle(), CLRRTS );
  26. return dwWritten;
  27. }