Browse Source

Merge pull request #2 from bmx-ng/task/serial-mod-0424

Updated serial to rev 6cec39e.
Brucey 1 year ago
parent
commit
0b9c5d6a20

+ 1 - 1
serial.mod/common.bmx

@@ -1,4 +1,4 @@
-' Copyright (c) 2013-2023 Bruce A Henderson
+' Copyright (c) 2013-2024 Bruce A Henderson
 ' 
 ' 
 ' Permission is hereby granted, free of charge, to any person obtaining a copy
 ' Permission is hereby granted, free of charge, to any person obtaining a copy
 ' of this software and associated documentation files (the "Software"), to deal
 ' of this software and associated documentation files (the "Software"), to deal

+ 1 - 1
serial.mod/glue.cpp

@@ -1,5 +1,5 @@
 /*
 /*
-  Copyright (c) 2013-2023 Bruce A Henderson
+  Copyright (c) 2013-2024 Bruce A Henderson
  
  
   Permission is hereby granted, free of charge, to any person obtaining a copy
   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   of this software and associated documentation files (the "Software"), to deal

+ 1 - 1
serial.mod/list_linux.cpp

@@ -1,5 +1,5 @@
 /*
 /*
-  Copyright (c) 2013-2023 Bruce A Henderson
+  Copyright (c) 2013-2024 Bruce A Henderson
  
  
   Permission is hereby granted, free of charge, to any person obtaining a copy
   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   of this software and associated documentation files (the "Software"), to deal

+ 1 - 1
serial.mod/list_osx.cpp

@@ -1,5 +1,5 @@
 /*
 /*
-  Copyright (c) 2013-2023 Bruce A Henderson
+  Copyright (c) 2013-2024 Bruce A Henderson
  
  
   Permission is hereby granted, free of charge, to any person obtaining a copy
   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   of this software and associated documentation files (the "Software"), to deal

+ 1 - 1
serial.mod/list_win32.cpp

@@ -1,5 +1,5 @@
 /*
 /*
-  Copyright (c) 2013-2023 Bruce A Henderson
+  Copyright (c) 2013-2024 Bruce A Henderson
  
  
   Permission is hereby granted, free of charge, to any person obtaining a copy
   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   of this software and associated documentation files (the "Software"), to deal

+ 6 - 3
serial.mod/serial.bmx

@@ -1,4 +1,4 @@
-' Copyright (c) 2013-2023 Bruce A Henderson
+' Copyright (c) 2013-2024 Bruce A Henderson
 ' 
 ' 
 ' Permission is hereby granted, free of charge, to any person obtaining a copy
 ' Permission is hereby granted, free of charge, to any person obtaining a copy
 ' of this software and associated documentation files (the "Software"), to deal
 ' of this software and associated documentation files (the "Software"), to deal
@@ -25,11 +25,14 @@ bbdoc: Serial port interface.
 End Rem
 End Rem
 Module IO.Serial
 Module IO.Serial
 
 
-ModuleInfo "Version: 1.03"
+ModuleInfo "Version: 1.04"
 ModuleInfo "License: MIT"
 ModuleInfo "License: MIT"
 ModuleInfo "Copyright: Serial Library - 2012 William Woodall, John Harrison"
 ModuleInfo "Copyright: Serial Library - 2012 William Woodall, John Harrison"
-ModuleInfo "Copyright: BlitzMax wrapper - 2013-2023 Bruce A Henderson"
+ModuleInfo "Copyright: BlitzMax wrapper - 2013-2024 Bruce A Henderson"
 
 
+ModuleInfo "History: 1.04"
+ModuleInfo "History: Update to woollybah/serial rev 6cec39e"
+ModuleInfo "History: Use PurgeComm on win32 flush"
 ModuleInfo "History: 1.03"
 ModuleInfo "History: 1.03"
 ModuleInfo "History: Changed to use https://github.com/woollybah/serial rev 28d33dd"
 ModuleInfo "History: Changed to use https://github.com/woollybah/serial rev 28d33dd"
 ModuleInfo "History: Converted consts to enums"
 ModuleInfo "History: Converted consts to enums"

+ 2 - 1
serial.mod/serial/src/impl/win.cc

@@ -577,7 +577,8 @@ Serial::SerialImpl::flush ()
   if (is_open_ == false) {
   if (is_open_ == false) {
     throw PortNotOpenedException ("Serial::flush");
     throw PortNotOpenedException ("Serial::flush");
   }
   }
-  FlushFileBuffers (fd_);
+  PurgeComm(fd_, PURGE_RXCLEAR);
+  PurgeComm(fd_, PURGE_TXCLEAR);
 }
 }
 
 
 void
 void

+ 1 - 1
serial.mod/source.bmx

@@ -1,4 +1,4 @@
-' Copyright (c) 2013-2023 Bruce A Henderson
+' Copyright (c) 2013-2024 Bruce A Henderson
 ' 
 ' 
 ' Permission is hereby granted, free of charge, to any person obtaining a copy
 ' Permission is hereby granted, free of charge, to any person obtaining a copy
 ' of this software and associated documentation files (the "Software"), to deal
 ' of this software and associated documentation files (the "Software"), to deal