* @brief Returns the USB configuration as a flat list of editable properties. */
| 1203 | * @brief Returns the USB configuration as a flat list of editable properties. |
| 1204 | */ |
| 1205 | QList<IO::DriverProperty> IO::Drivers::USB::driverProperties() const |
| 1206 | { |
| 1207 | QList<IO::DriverProperty> props; |
| 1208 | |
| 1209 | IO::DriverProperty dev; |
| 1210 | dev.key = QStringLiteral("deviceIndex"); |
| 1211 | dev.label = tr("USB Device"); |
| 1212 | dev.type = IO::DriverProperty::ComboBox; |
| 1213 | dev.value = m_deviceIndex; |
| 1214 | dev.options = deviceList(); |
| 1215 | props.append(dev); |
| 1216 | |
| 1217 | IO::DriverProperty mode; |
| 1218 | mode.key = QStringLiteral("transferMode"); |
| 1219 | mode.label = tr("Transfer Mode"); |
| 1220 | mode.type = IO::DriverProperty::ComboBox; |
| 1221 | mode.value = static_cast<int>(m_transferMode); |
| 1222 | mode.options = {tr("Bulk Stream"), tr("Advanced Control"), tr("Isochronous")}; |
| 1223 | props.append(mode); |
| 1224 | |
| 1225 | IO::DriverProperty inEp; |
| 1226 | inEp.key = QStringLiteral("inEndpointIndex"); |
| 1227 | inEp.label = tr("IN Endpoint"); |
| 1228 | inEp.type = IO::DriverProperty::ComboBox; |
| 1229 | inEp.value = m_inEndpointIndex; |
| 1230 | inEp.options = inEndpointList(); |
| 1231 | props.append(inEp); |
| 1232 | |
| 1233 | IO::DriverProperty outEp; |
| 1234 | outEp.key = QStringLiteral("outEndpointIndex"); |
| 1235 | outEp.label = tr("OUT Endpoint"); |
| 1236 | outEp.type = IO::DriverProperty::ComboBox; |
| 1237 | outEp.value = m_outEndpointIndex; |
| 1238 | outEp.options = outEndpointList(); |
| 1239 | props.append(outEp); |
| 1240 | |
| 1241 | IO::DriverProperty iso; |
| 1242 | iso.key = QStringLiteral("isoPacketSize"); |
| 1243 | iso.label = tr("ISO Packet Size"); |
| 1244 | iso.type = IO::DriverProperty::IntField; |
| 1245 | iso.value = m_isoPacketSize; |
| 1246 | iso.min = 1; |
| 1247 | iso.max = 65535; |
| 1248 | props.append(iso); |
| 1249 | |
| 1250 | return props; |
| 1251 | } |
| 1252 | |
| 1253 | /** |
| 1254 | * @brief Applies a single USB configuration change by key. |
no test coverage detected