Lines Matching defs:role
66 * Power role: This USB port can act as a source (provide power).
71 * Power role: This USB port can act as a sink (receive power).
76 * Data role: This USB port can act as a host (access data services).
81 * Data role: This USB port can act as a device (offer data services).
116 * Combines one power and one data role together into a unique value with
121 * @param powerRole The desired power role: {@link UsbPort#POWER_ROLE_SOURCE}
122 * or {@link UsbPort#POWER_ROLE_SINK}, or 0 if no power role.
123 * @param dataRole The desired data role: {@link UsbPort#DATA_ROLE_HOST}
124 * or {@link UsbPort#DATA_ROLE_DEVICE}, or 0 if no data role.
150 public static String powerRoleToString(int role) {
151 switch (role) {
159 return Integer.toString(role);
164 public static String dataRoleToString(int role) {
165 switch (role) {
173 return Integer.toString(role);