aboutsummaryrefslogtreecommitdiffstats
path: root/heimdall/source/BridgeManager.h
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2013-03-08 00:00:52 +1100
committerBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2013-03-08 00:12:27 +1100
commitebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768 (patch)
tree2267ec17efe5435887cb68169a56418acf7a9f05 /heimdall/source/BridgeManager.h
parent9d7008e4ba010162945d985adf560dce7274bc00 (diff)
downloadexternal_heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.zip
external_heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.tar.gz
external_heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.tar.bz2
- Removed legacy command line hard-coded partition name parameters.
- As a result of the above two points, there are no "known boot partitions", and hence boot partitions are not automatically flashed last. - Made partitions flash in the order in order in which partition arguments are specified. Hence, it's recommended that you specify boot partitions last. - Added --usb-level argument that can be used for debugging libusbx, or flashing issues in general. - Removed generally non-functional firmware dumping behaviour. - Removed auto-resume functionality - Although this feature was definitely nice to have; I believe it may be responsible for flashing compatibility issues for a variety of devices. - As a result of the above. In order perform another action after a --no-reboot action, you must provide the --resume flag. - Heimdall Frontend also has support for specifying the --resume flag via a GUI. Heimdall Frontend also tries to keep track of your actions and enable "Resume" automatically after a "No Reboot" action. - Refactored quite a few of the actions, and code responsible for flashing (particularly PIT file flashing). - Bumped version to 1.4RC3 *however* this commit is not yet an official release candidate. It's still a WIP. In particular build files still have not been updated for Linux and OS X.
Diffstat (limited to 'heimdall/source/BridgeManager.h')
-rw-r--r--heimdall/source/BridgeManager.h31
1 files changed, 26 insertions, 5 deletions
diff --git a/heimdall/source/BridgeManager.h b/heimdall/source/BridgeManager.h
index 2978340..4402710 100644
--- a/heimdall/source/BridgeManager.h
+++ b/heimdall/source/BridgeManager.h
@@ -21,6 +21,9 @@
#ifndef BRIDGEMANAGER_H
#define BRIDGEMANAGER_H
+// libpit
+#include "libpit.h"
+
// Heimdall
#include "Heimdall.h"
@@ -81,6 +84,17 @@ namespace Heimdall
kPidGalaxyCamera = 0x6860 // Is this necessary?
};
+ enum class UsbLogLevel
+ {
+ None = 0,
+ Error,
+ Warning,
+ Info,
+ Debug,
+
+ Default = Error
+ };
+
private:
static const DeviceIdentifier supportedDevices[kSupportedDeviceCount];
@@ -109,13 +123,14 @@ namespace Heimdall
unsigned int fileTransferPacketSize;
unsigned int fileTransferSequenceTimeout;
+ UsbLogLevel usbLogLevel;
+
int FindDeviceInterface(void);
bool ClaimDeviceInterface(void);
bool SetupDeviceInterface(void);
void ReleaseDeviceInterface(void);
- bool CheckProtocol(void) const;
- bool InitialiseProtocol(void) const;
+ bool InitialiseProtocol(void);
public:
@@ -123,7 +138,7 @@ namespace Heimdall
~BridgeManager();
bool DetectDevice(void);
- int Initialise(void);
+ int Initialise(bool resume);
bool BeginSession(void);
bool EndSession(bool reboot) const;
@@ -133,12 +148,18 @@ namespace Heimdall
bool RequestDeviceType(unsigned int request, int *result) const;
- bool SendPitFile(FILE *file) const;
+ bool SendPitData(const libpit::PitData *pitData) const;
int ReceivePitFile(unsigned char **pitBuffer) const;
int DownloadPitFile(unsigned char **pitBuffer) const; // Thin wrapper around ReceivePitFile() with additional logging.
bool SendFile(FILE *file, unsigned int destination, unsigned int deviceType, unsigned int fileIdentifier = 0xFFFFFFFF) const;
- bool ReceiveDump(unsigned int chipType, unsigned int chipId, FILE *file) const;
+
+ void SetUsbLogLevel(UsbLogLevel usbLogLevel);
+
+ UsbLogLevel GetUsbLogLevel(void) const
+ {
+ return usbLogLevel;
+ }
bool IsVerbose(void) const
{