001 /* 002 * =========================================================================================== 003 * = COPYRIGHT 004 * PAX Computer Technology (Shenzhen) Co., Ltd. PROPRIETARY INFORMATION 005 * This software is supplied under the terms of a license agreement or nondisclosure 006 * agreement with PAX Computer Technology (Shenzhen) Co., Ltd. and may not be copied or 007 * disclosed except in accordance with the terms in that agreement. 008 * Copyright (C) 2017-2023 PAX Computer Technology (Shenzhen) Co., Ltd. All rights reserved. 009 * Description: // Detail description about the function of this module, 010 * // interfaces with the other modules, and dependencies. 011 * Revision History: 012 * Date Author Action 013 * 2017/04/01 PAX Create/Add/Modify/Delete 014 * =========================================================================================== 015 */ 016 017package com.pax.dal.entity; 018 019/** 020 * <div class="zh"> 021 * 串口定义 022 * </div> 023 * <div class="en"> 024 * uart port 025 * </div> 026 * @author Steven.W 027 */ 028public enum EUartPort { 029 030 /** 031 * com1 032 */ 033 COM1(0), 034 /** 035 * com2 036 */ 037 COM2(1), 038 /** 039 * wireless 040 */ 041 WIRELESS(2), 042 /** 043 * pinpad 044 */ 045 PINPAD(3), 046 /** 047 * modem 048 */ 049 MODEM(4), 050 /** 051 * Wi-Fi 052 */ 053 WIFI(5), 054 /** 055 * TAX 056 */ 057 TAX(6), 058 /** 059 * visit FTDI USB convert serial port 060 */ 061 FTDIUSB(10), 062 /** 063 * USB device mode port 064 */ 065 USBDEV(11), 066 067 /** 068 * USB host mode port 069 */ 070 @Deprecated 071 USBHOST(12), 072 /** 073 * USB CCID device mode port 074 */ 075 @Deprecated 076 USBCCID(13), 077 078 /** 079 * Internal communication channel between Android system and security module 080 */ 081 COM19(19), 082 083 /** 084 * USB convert serial port. Same as {@link #FTDIUSB}. 085 */ 086 USBCOM10(10), 087 088 /** 089 * USB convert serial port. 090 * @since V3.16.00 091 */ 092 USBCOM30(30), 093 094 /** 095 * <div class="zh">USB设备模式端口。仅当授权功能被禁用时才能使用。</div> 096 * <div class="en">USB device mode port. It can be used only when the authorization function is disabled.</div> 097 * @since V3.22.00 098 */ 099 USBDEV50(50), 100 101 /** 102 * <div class="zh">底座串口。</div> 103 * <div class="en">Base communication port.</div> 104 * @since V4.05.00 105 */ 106 BASEDEV(15) 107 ; 108 109 private byte channel; 110 111 private EUartPort(int channel) { 112 this.channel = (byte) channel; 113 } 114 115 116 public byte getChannel() { 117 return channel; 118 } 119 120 public static EUartPort valuesOf(int channel) { 121 for (EUartPort up : EUartPort.values()) { 122 if (up.getChannel() == (byte) channel) 123 return up; 124 } 125 return null; 126 } 127 128}