Home | History | Annotate | Download | only in usb

Lines Matching refs:powerRole

149      * @param powerRole The desired power role: {@link UsbPort#POWER_ROLE_SOURCE}
155 public static int combineRolesAsBit(int powerRole, int dataRole) {
156 checkRoles(powerRole, dataRole);
157 final int index = ((powerRole - POWER_ROLE_OFFSET) * NUM_DATA_ROLES) + dataRole;
227 final int powerRole = (index / NUM_DATA_ROLES + POWER_ROLE_OFFSET);
234 result.append(powerRoleToString(powerRole));
244 public static void checkMode(int powerRole) {
245 Preconditions.checkArgumentInRange(powerRole, Constants.PortMode.NONE,
252 Constants.PortPowerRole.NUM_POWER_ROLES - 1, "powerRole");
258 Constants.PortDataRole.NUM_DATA_ROLES - 1, "powerRole");
262 public static void checkRoles(int powerRole, int dataRole) {
263 Preconditions.checkArgumentInRange(powerRole, POWER_ROLE_NONE, POWER_ROLE_SINK,
264 "powerRole");