let inEndpoint = undefined; for (const endpoint of dataInterface.alternate.endpoints) { if (endpoint.type == 'bulk' && endpoint.direction == 'in') {
inEndpoint = endpoint; break;
}
}
assert_not_equals(inEndpoint, undefined, 'No IN endpoint found.');
let outEndpoint = undefined; for (const endpoint of dataInterface.alternate.endpoints) { if (endpoint.type == 'bulk' && endpoint.direction == 'out') {
outEndpoint = endpoint; break;
}
}
assert_not_equals(outEndpoint, undefined, 'No OUT endpoint found.');
// Execute a SET_CONTROL_LINE_STATE command to let the device know the // host is ready to transmit and receive data.
await device.controlTransferOut({
requestType: 'class',
recipient: 'interface',
request: 0x22,
value: 0x01,
index: controlInterface.interfaceNumber,
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.