summaryrefslogtreecommitdiffstats
path: root/heimdall/source/BridgeManager.h
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-05-17 21:45:39 +0200
committerBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-05-17 21:45:39 +0200
commit900161750ee5c21a56868bc0d56c755083afbe32 (patch)
tree166a3c7afcef3b3719b7adde86336949b6845cd2 /heimdall/source/BridgeManager.h
parentTweaked VC++ linker options for Frontend (to ensure quicker builds). (diff)
downloadHeimdall-900161750ee5c21a56868bc0d56c755083afbe32.tar
Heimdall-900161750ee5c21a56868bc0d56c755083afbe32.tar.gz
Heimdall-900161750ee5c21a56868bc0d56c755083afbe32.tar.bz2
Heimdall-900161750ee5c21a56868bc0d56c755083afbe32.tar.lz
Heimdall-900161750ee5c21a56868bc0d56c755083afbe32.tar.xz
Heimdall-900161750ee5c21a56868bc0d56c755083afbe32.tar.zst
Heimdall-900161750ee5c21a56868bc0d56c755083afbe32.zip
Diffstat (limited to '')
-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;