diff options
author | Pascal Obry <obry@adacore.com> | 2008-04-08 08:42:41 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-04-08 08:42:41 +0200 |
commit | 42c3898c1d9a5351eaac6ffd792a5d1aaa268435 (patch) | |
tree | 846458809f617b6811dda5e74ec15d1be5265eef /gcc/ada/g-sercom.adb | |
parent | e68c63e3800a7ff463fc0c41cd769569793fb53b (diff) | |
download | gcc-42c3898c1d9a5351eaac6ffd792a5d1aaa268435.tar.gz |
g-sercom.ads, [...] (Data_Rate): Add B115200.
2008-04-08 Pascal Obry <obry@adacore.com>
* g-sercom.ads, g-sercom.adb (Data_Rate): Add B115200.
(Stop_Bits_Number): New type.
(Parity_Check): Likewise.
(Set): Add parameter to set the number of stop bits and
the parity. Parameter timeout is now a duration instead
of a plain integer.
* g-sercom-linux.adb:
Implement the stop bits and parity support for GNU/Linux.
Fix handling of timeout, it must be given in tenth of seconds.
* g-sercom-mingw.adb:
Implement the stop bits and parity support for Windows.
Use new s-win32.ads unit instead of declaring Win32 services
directly into this body.
Update handling of timeout as now a duration.
* s-win32.ads, s-winext.ads: New files.
From-SVN: r134003
Diffstat (limited to 'gcc/ada/g-sercom.adb')
-rw-r--r-- | gcc/ada/g-sercom.adb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/ada/g-sercom.adb b/gcc/ada/g-sercom.adb index 920557b2643..ead5c868c6e 100644 --- a/gcc/ada/g-sercom.adb +++ b/gcc/ada/g-sercom.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007, AdaCore -- +-- Copyright (C) 2007-2008, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -77,11 +77,13 @@ package body GNAT.Serial_Communications is --------- procedure Set - (Port : Serial_Port; - Rate : Data_Rate := B9600; - Bits : Data_Bits := B8; - Block : Boolean := True; - Timeout : Integer := 10) is + (Port : Serial_Port; + Rate : Data_Rate := B9600; + Bits : Data_Bits := B8; + Stop_Bits : Stop_Bits_Number := One; + Parity : Parity_Check := None; + Block : Boolean := True; + Timeout : Duration := 10.0) is begin Unimplemented; end Set; @@ -124,8 +126,7 @@ package body GNAT.Serial_Communications is procedure Unimplemented is begin - raise Program_Error - with "Serial_Communications not implemented"; + raise Program_Error with "Serial_Communications not implemented"; end Unimplemented; end GNAT.Serial_Communications; |