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.
44 lines
934 B
44 lines
934 B
using System.ComponentModel;
|
|
|
|
using Library = RJCP.IO.Ports;
|
|
|
|
namespace MultiTerm.Protocols.Serial;
|
|
|
|
public enum StopBits
|
|
{
|
|
//
|
|
// Summary:
|
|
// One stop bit.
|
|
[Description("1")]
|
|
One,
|
|
//
|
|
// Summary:
|
|
// 1.5 stop bits.
|
|
[Description("1.5")]
|
|
One5,
|
|
//
|
|
// Summary:
|
|
// Two stop bits.
|
|
[Description("2")]
|
|
Two
|
|
}
|
|
|
|
internal class StopBitsLibraryEquivalentConverter : ILibraryEquivalentConverter<StopBits, Library.StopBits>
|
|
{
|
|
public Library.StopBits ConvertToLibraryType(StopBits obj)
|
|
{
|
|
return obj switch
|
|
{
|
|
StopBits.One => Library.StopBits.One,
|
|
StopBits.One5 => Library.StopBits.One5,
|
|
StopBits.Two => Library.StopBits.Two,
|
|
_ => throw new NotImplementedException(),
|
|
};
|
|
}
|
|
|
|
public StopBits ConvertToLocalType(Library.StopBits obj)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
|
|
|