add additional permissions so we can use USB api

10.3.x-maintenance
cTn 2014-06-08 18:42:31 +02:00
parent 8231c60b3c
commit cda43ac9bf
2 changed files with 13 additions and 0 deletions

View File

@ -53,6 +53,12 @@ var STM32DFU_protocol = function() {
dfuUPLOAD_IDLE: 9, // The device is processing an upload operation. Expecting DFU_UPLOAD requests. dfuUPLOAD_IDLE: 9, // The device is processing an upload operation. Expecting DFU_UPLOAD requests.
dfuERROR: 10 // An error has occurred. Awaiting the DFU_CLRSTATUS request. dfuERROR: 10 // An error has occurred. Awaiting the DFU_CLRSTATUS request.
}; };
this.usbDevices = {
F3DiscoveryDFU: {'vendorId': 1155, 'productId': 57105}
};
this.usbPermissions = {permissions: [{'usbDevices': [this.usbDevices.F3DiscoveryDFU]}]};
}; };
STM32DFU_protocol.prototype.openDevice = function(callback) { STM32DFU_protocol.prototype.openDevice = function(callback) {

View File

@ -23,6 +23,7 @@
"https://*.github.com/", "https://*.github.com/",
"https://*.githubusercontent.com/", "https://*.githubusercontent.com/",
"serial", "serial",
"usb",
"storage", "storage",
"fileSystem", "fileSystem",
"fileSystem.write", "fileSystem.write",
@ -30,6 +31,12 @@
"notifications" "notifications"
], ],
"optional_permissions": [
{"usbDevices": [
{"vendorId": 1155, "productId": 57105}
]}
],
"icons": { "icons": {
"128": "images/icon_128.png" "128": "images/icon_128.png"
} }