diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-08-06 08:35:47 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-08-06 08:35:47 +0000 |
commit | b76829e9b0a0ee4dfa02a95af8d45612fbda21b7 (patch) | |
tree | 63a411a3cf6a846e49f7e994420974199304592a /gcc/ada/g-sercom-mingw.adb | |
parent | 32ec9a977785bafa492185ac4e5e0880f93d7d17 (diff) | |
download | gcc-b76829e9b0a0ee4dfa02a95af8d45612fbda21b7.tar.gz |
2012-08-06 Thomas Quinot <quinot@adacore.com>
* sem_ch4.adb: Minor reformatting.
2012-08-06 Thomas Quinot <quinot@adacore.com>
* s-oscons-tmplt.c, xoscons.adb: Per the Single UNIX Specification,
types cc_t, speed_t, and tcflag_t defined in <termios.h> all are
unsigned types. Add required special handling to have their correct
unsigned values in s-oscons.ads.
2012-08-06 Thomas Quinot <quinot@adacore.com>
* par-ch13.adb: Minor reformatting.
2012-08-06 Thomas Quinot <quinot@adacore.com>
* g-sercom.adb, g-sercom.ads, g-sercom-mingw.adb, g-sercom-linux.adb
(Set): Add Local and Flow_Control settings.
2012-08-06 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb: Suppress saving of 'Old if assertions are not
enabled.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190170 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-sercom-mingw.adb')
-rw-r--r-- | gcc/ada/g-sercom-mingw.adb | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/gcc/ada/g-sercom-mingw.adb b/gcc/ada/g-sercom-mingw.adb index df3754b685a..726d21f6bbb 100644 --- a/gcc/ada/g-sercom-mingw.adb +++ b/gcc/ada/g-sercom-mingw.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2010, AdaCore -- +-- Copyright (C) 2007-2012, 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- -- @@ -175,8 +175,12 @@ package body GNAT.Serial_Communications is Stop_Bits : Stop_Bits_Number := One; Parity : Parity_Check := None; Block : Boolean := True; + Local : Boolean := True; + Flow : Flow_Control := None; Timeout : Duration := 10.0) is + pragma Unreferenced (Local); + Success : BOOL; Com_Time_Out : aliased COMMTIMEOUTS; Com_Settings : aliased DCB; @@ -197,13 +201,26 @@ package body GNAT.Serial_Communications is Com_Settings.BaudRate := DWORD (Data_Rate_Value (Rate)); Com_Settings.fParity := 1; Com_Settings.fBinary := Bits1 (System.Win32.TRUE); - Com_Settings.fOutxCtsFlow := 0; Com_Settings.fOutxDsrFlow := 0; Com_Settings.fDsrSensitivity := 0; - Com_Settings.fDtrControl := DTR_CONTROL_DISABLE; - Com_Settings.fOutX := 0; + Com_Settings.fDtrControl := DTR_CONTROL_ENABLE; Com_Settings.fInX := 0; - Com_Settings.fRtsControl := RTS_CONTROL_DISABLE; + Com_Settings.fRtsControl := RTS_CONTROL_ENABLE; + + case Flow is + when None => + Com_Settings.fOutX := 0; + Com_Settings.fOutxCtsFlow := 0; + + when RTS_CTS => + Com_Settings.fOutX := 0; + Com_Settings.fOutxCtsFlow := 1; + + when Xon_Xoff => + Com_Settings.fOutX := 1; + Com_Settings.fOutxCtsFlow := 0; + end case; + Com_Settings.fAbortOnError := 0; Com_Settings.ByteSize := BYTE (C_Bits (Bits)); Com_Settings.Parity := BYTE (C_Parity (Parity)); |