1 //
2 // Copyright (c) 2010-2018 Antmicro
3 // Copyright (c) 2011-2015 Realtime Embedded
4 //
5 // This file is licensed under the MIT License.
6 // Full license text is available in 'licenses/MIT.txt'.
7 //
8 
9 using System;
10 using Antmicro.Renode.UserInterface;
11 
12 namespace Antmicro.Renode.Peripherals.UART
13 {
14     [Icon("monitor")]
15 	public interface IUART : IPeripheral
16 	{
17         // This field should be made [Transient] in all implementor classes!
18         event Action<byte> CharReceived;
WriteChar(byte value)19         void WriteChar(byte value);
20 
21         uint BaudRate { get; }
22         Bits StopBits { get; }
23         Parity ParityBit { get; }
24 	}
25 
26     public enum Parity
27     {
28         Odd,
29         Even,
30         None,
31         Forced1,
32         Forced0,
33         Multidrop
34     }
35 
36     public enum Bits
37     {
38         None,
39         One,
40         Half,
41         OneAndAHalf,
42         Two
43     }
44 }
45 
46