X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/6658905f18a1eebc148836f26c731dea9c1377dc..8fcbf652dab8846dd8a2dcb17812af6528539950:/include/proxmark3.h diff --git a/include/proxmark3.h b/include/proxmark3.h index a94435e8..31c71642 100644 --- a/include/proxmark3.h +++ b/include/proxmark3.h @@ -52,6 +52,7 @@ typedef signed short SWORD; // USB declarations void UsbSendPacket(BYTE *packet, int len); +BOOL UsbConnected(); BOOL UsbPoll(BOOL blinkLeds); void UsbStart(void); @@ -59,4 +60,28 @@ void UsbStart(void); // if data are available. void UsbPacketReceived(BYTE *packet, int len); +#define VERSION_INFORMATION_MAGIC 0x56334d50 +struct version_information { + int magic; /* Magic sequence to identify this as a correct version information structure. Must be VERSION_INFORMATION_MAGIC */ + char versionversion; /* Must be 1 */ + char present; /* 1 if the version information could be created at compile time, otherwise 0 and the remaining fields (except for magic) are empty */ + char clean; /* 1: Tree was clean, no local changes. 0: Tree was unclean. 2: Couldn't be determined */ + char svnversion[9]; /* String with the SVN revision */ + char buildtime[30]; /* string with the build time */ +} __attribute__((packed)); + +#define COMMON_AREA_MAGIC 0x43334d50 +#define COMMON_AREA_COMMAND_NONE 0 +#define COMMON_AREA_COMMAND_ENTER_FLASH_MODE 1 +struct common_area { + int magic; /* Magic sequence, to distinguish against random uninitialized memory */ + char version; /* Must be 1 */ + char command; + struct { + unsigned int bootrom_present:1; /* Set when a bootrom that is capable of parsing the common area is present */ + unsigned int osimage_present:1; /* Set when a osimage that is capable of parsing the common area is present */ + } __attribute__((packed)) flags; + int arg1, arg2; +} __attribute__((packed)); + #endif