aboutsummaryrefslogtreecommitdiffstats
path: root/heimdall/source/BridgeManager.h
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-05-18 05:45:39 +1000
committerBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-05-18 05:45:39 +1000
commit900161750ee5c21a56868bc0d56c755083afbe32 (patch)
tree166a3c7afcef3b3719b7adde86336949b6845cd2 /heimdall/source/BridgeManager.h
parentd1a7f8d6934aa614863299228f9feaf652caa060 (diff)
downloadexternal_heimdall-900161750ee5c21a56868bc0d56c755083afbe32.zip
external_heimdall-900161750ee5c21a56868bc0d56c755083afbe32.tar.gz
external_heimdall-900161750ee5c21a56868bc0d56c755083afbe32.tar.bz2
Fixed regression that broke support for GT-I9100 etc.
Diffstat (limited to 'heimdall/source/BridgeManager.h')
-rw-r--r--heimdall/source/BridgeManager.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/heimdall/source/BridgeManager.h b/heimdall/source/BridgeManager.h
index 6b967fa..7028003 100644
--- a/heimdall/source/BridgeManager.h
+++ b/heimdall/source/BridgeManager.h
@@ -73,9 +73,15 @@ namespace Heimdall
enum
{
- kPidGalaxyS = 0x6601,
- kPidGalaxyS2 = 0x685D,
- kPidDroidCharge = 0x68C3
+ kPidGalaxyS = 0x6601,
+ kPidGalaxyS2 = 0x685D,
+ kPidDroidCharge = 0x68C3
+ };
+
+ enum
+ {
+ kDefaultTimeoutSend = 3000,
+ kDefaultTimeoutReceive = 3000
};
enum class UsbLogLevel
@@ -89,6 +95,14 @@ namespace Heimdall
Default = Error
};
+ enum
+ {
+ kSendEmptyTransferNone = 0,
+ kSendEmptyTransferBefore = 1,
+ kSendEmptyTransferAfter = 1 << 1,
+ kSendEmptyTransferBeforeAndAfter = kSendEmptyTransferBefore | kSendEmptyTransferAfter
+ };
+
private:
static const DeviceIdentifier supportedDevices[kSupportedDeviceCount];
@@ -125,7 +139,7 @@ namespace Heimdall
bool InitialiseProtocol(void);
- bool SendBulkTransfer(unsigned char *data, int length, int timeout = 3000) const;
+ bool SendBulkTransfer(unsigned char *data, int length, int timeout) const;
public:
@@ -138,8 +152,8 @@ namespace Heimdall
bool BeginSession(void);
bool EndSession(bool reboot) const;
- bool SendPacket(OutboundPacket *packet, int timeout = 3000) const;
- bool ReceivePacket(InboundPacket *packet, int timeout = 3000) const;
+ bool SendPacket(OutboundPacket *packet, int timeout = kDefaultTimeoutSend, int sendEmptyTransferFlags = kSendEmptyTransferAfter) const;
+ bool ReceivePacket(InboundPacket *packet, int timeout = kDefaultTimeoutReceive) const;
bool RequestDeviceType(unsigned int request, int *result) const;