From ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Fri, 8 Mar 2013 00:00:52 +1100 Subject: - 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. --- heimdall/source/BridgeManager.h | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'heimdall/source/BridgeManager.h') 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 { -- cgit v1.1