aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Firmware/Tango.FirmwareUpdateLib/FirmwareUpdateManager.h
blob: f176517c0a6e34e37622bbda5d6711d9f2f89b7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <stdio.h>
#include "stdafx.h"
#include <stdlib.h>
#include <conio.h>
#include <windows.h>
#include "lmdfu.h"
#include "lmdfuwrap.h"
#include "DFUDevice.h";

#pragma once

using namespace System;
using namespace System::Collections;
using namespace System::Collections::Generic;

namespace Tango
{
	namespace FirmwareUpdateLib
	{

		public ref class FirmwareUpdateManager
		{
			//Initialization Errors
			String^ DFU_ERR_NOT_FOUND_ERROR = "The driver for the USB Device Firmware Upgrade device cannot be found.\nBefore running this program, please connect the DFU device to this system\nand install the device driver when prompted by Windows.  The device driver\ncan be found on the evaluation kit CD or can be found in the windows_drivers\ndirectory of your TivaWare installation.\n\n";
			String^ DFU_ERR_INVALID_ADDR_ERROR = "The driver for the USB Device Firmware Upgrade device was found but appears\nto be a version which this program does not support. Please download and\ninstall the latest device driver and example applications from the TI\nweb site to ensure that you are using compatible versions. The drivers\ncan be found in the windows_drivers directory of your TivaWare\ninstallation and the applications can be found in package \"Windows-side\nexamples for USB kits\" which may be downloaded from the web site at\nhttp://www.ti.com/software_updates.\n\n";
			String^ DFU_ERR_UNKNOWN_ERROR = "An error was reported while attempting to load the device driver for the \nUSB Device Firmware Upgrade device.  If this error persists, please download\nand reinstall the latest device driver and example applications from the TI\nweb site. The drivers can be found in the windows_drivers directory of your\nTivaWare installation and the applications can be found in package\n\"Windows-side examples for USB kits\" which may be downloaded from\n";

		public:
			void Initialize();
			List<DFUDevice^>^ GetAvailableDevices(bool fetchTwineExtras);
		};
	}
}
e_chunk_upload_response__pack_to_buffer (const FileChunkUploadResponse *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &file_chunk_upload_response__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); } FileChunkUploadResponse * file_chunk_upload_response__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data) { return (FileChunkUploadResponse *) protobuf_c_message_unpack (&file_chunk_upload_response__descriptor, allocator, len, data); } void file_chunk_upload_response__free_unpacked (FileChunkUploadResponse *message, ProtobufCAllocator *allocator) { if(!message) return; assert(message->base.descriptor == &file_chunk_upload_response__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } static const ProtobufCFieldDescriptor file_chunk_upload_response__field_descriptors[1] = { { "", 1, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, offsetof(FileChunkUploadResponse, has_iscanceled), offsetof(FileChunkUploadResponse, iscanceled), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, }; static const unsigned file_chunk_upload_response__field_indices_by_name[] = { 0, /* field[0] = IsCanceled */ }; static const ProtobufCIntRange file_chunk_upload_response__number_ranges[1 + 1] = { { 1, 0 }, { 0, 1 } }; const ProtobufCMessageDescriptor file_chunk_upload_response__descriptor = { PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, "", "", "", "", sizeof(FileChunkUploadResponse), 1, file_chunk_upload_response__field_descriptors, file_chunk_upload_response__field_indices_by_name, 1, file_chunk_upload_response__number_ranges, (ProtobufCMessageInit) file_chunk_upload_response__init, NULL,NULL,NULL /* reserved[123] */ };