aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Firmware/Tango.FirmwareUpdateLib/DFUException.h
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-01-01 17:28:19 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-01-01 17:28:19 +0200
commit25f5e6ddef7ef2fa0a747305847eeb4ceee5a2c9 (patch)
tree600a6623f866d48a522406b4d93e5f213d290c61 /Software/Visual_Studio/Firmware/Tango.FirmwareUpdateLib/DFUException.h
parent9a3114908dd0a4f61fc959ef0f352b2b6255a652 (diff)
downloadTango-25f5e6ddef7ef2fa0a747305847eeb4ceee5a2c9.tar.gz
Tango-25f5e6ddef7ef2fa0a747305847eeb4ceee5a2c9.zip
Added tango firmware update lib.
Diffstat (limited to 'Software/Visual_Studio/Firmware/Tango.FirmwareUpdateLib/DFUException.h')
-rw-r--r--Software/Visual_Studio/Firmware/Tango.FirmwareUpdateLib/DFUException.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Firmware/Tango.FirmwareUpdateLib/DFUException.h b/Software/Visual_Studio/Firmware/Tango.FirmwareUpdateLib/DFUException.h
new file mode 100644
index 000000000..e3c61c8e5
--- /dev/null
+++ b/Software/Visual_Studio/Firmware/Tango.FirmwareUpdateLib/DFUException.h
@@ -0,0 +1,31 @@
+#include <stdio.h>
+#include "stdafx.h"
+#include <stdlib.h>
+#include <conio.h>
+#include <windows.h>
+#include "lmdfu.h"
+#include "lmdfuwrap.h"
+#include "DFUError.h"
+
+#pragma once
+
+using namespace System;
+
+namespace Tango
+{
+ namespace FirmwareUpdateLib {
+
+ ref class DFUException :
+ public Exception
+ {
+ internal:
+ DFUException(tLMDFUErr error) : Exception(gcnew String(_LMDFUErrorStringGet(error))) { Error = static_cast<DFUError>(error); };
+ public:
+ property DFUError Error;
+ DFUException();
+ DFUException(DFUError error) : Exception(error.ToString()) { Error = error; };
+ DFUException(DFUError error, String^ message) : Exception(message) { Error = error; };
+ };
+ }
+}
+