diff options
-rw-r--r-- | o3000.c | 27 | ||||
-rw-r--r-- | o3000.h | 1 |
2 files changed, 28 insertions, 0 deletions
@@ -869,6 +869,33 @@ int __stdcall o3000_send_xml(int id, const char *msg, int msg_len) { /** + * Do firmware update of the device + * + * @param data pointer to firmware update data + * @param data_len update package lenght in bytes + * @return 0 on success, -1 on failure + */ +int __stdcall o3000_firmware_update(unsigned char *data, int data_len) { + + int ret; + + // paranoia checks + if(data == NULL) { + return -1; + } + + + if(data_len <= 0) { + return -1; + } + + // checking whether all connection are closed + ret = firmware_update(data, data_len); + return ret; +} + + +/** * Disconnect a currently claimed USB connection. * Use this function if the driver is connected to an USB device. The o3000_connect() function-call is blocking now. * After disconnecting, the function o3000_connect() returns. The session is not cleaned-up due to the driver is ready the reconnect @@ -88,6 +88,7 @@ int __stdcall o3000_disconnect(int id); int __stdcall o3000_send_xml(int id, const char *msg, int msg_len);
+int __stdcall o3000_firmware_update(unsigned char *data, int data_len);
#if defined(__cplusplus) || defined(c_plusplus)
} // extern "C"
|