using System.Diagnostics.CodeAnalysis;
namespace FtdAdapter
{
///
/// Specifies the number of stop bits used on the UsbPort object.
///
[SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue")]
[SuppressMessage("Microsoft.Naming", "CA1717:OnlyFlagsEnumsShouldHavePluralNames")]
public enum FtdStopBits
{
///
/// One stop bit is used.
///
One = 1,
///
/// 1.5 stop bits are used.
///
OnePointFive,
///
/// Two stop bits are used.
///
Two
}
///
/// Specifies the parity used on the UsbPort object.
///
public enum FtdParity
{
///
/// No parity check occurs.
///
None = 0,
///
/// Sets the parity bit so that the count of bits set is an odd number.
///
Odd,
///
/// Sets the parity bit so that the count of bits set is an even number.
///
Even,
///
/// Leaves the parity bit set to 1.
///
Mark,
///
/// Leaves the parity bit set to 0.
///
Space
}
///
/// Specifies the flow control used on the UsbPort object.
///
[SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags")]
public enum FtdFlowControl
{
///
/// No flow control is used
///
None = 0x0000,
///
/// RTS CTS are used for flow control
///
RtsCts = 0x0100,
///
/// DTR DSR are used for flow control
///
DtrDsr = 0x0200,
///
/// XON XOFF are used for flow control
///
XonXoff = 0x0400
}
///
/// Specifies the result of a UsbPort operation.
///
internal enum FtdStatus
{
OK = 0,
InvalidHandle,
DeviceNotFound,
DeviceNotOpened,
IOError,
InsufficientResources,
InvalidParameter,
InvalidBaudRate,
DeviceNotOpenedForErase,
DeviceNotOpenedForWrite,
FailedToWriteDevice,
EEPromReadFailed,
EEPromWriteFailed,
EEPromEraseFailed,
EEPromNotPresent,
EEPromNotProgrammed,
InvalidArgs,
OtherError
}
///
/// Specifies how to open the device
///
internal enum OpenExFlags
{
BySerialNumber = 1,
ByDescription = 2,
ByLocation = 4
}
}