X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/8a6aec16d8c21d3c57457e5ec00eb83f5242feba..4271e82d56403879635cabe17a0e959c49fc1a83:/armsrc/appmain.c diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 9696b008..72d8789e 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -238,17 +238,19 @@ void ReadMem(int addr) /* osimage version information is linked in */ extern struct version_information version_information; +/* bootrom version information is pointed to from _bootphase1_version_pointer */ +extern char _bootphase1_version_pointer, _flash_start, _flash_end; void SendVersion(void) { char temp[48]; /* Limited data payload in USB packets */ DbpString("Prox/RFID mark3 RFID instrument"); - /* Try to find the bootrom version information. For the time being, expect - * to find a pointer at address 0x1001fc, perform slight sanity checks on - * the pointer, then use it. + /* Try to find the bootrom version information. Expect to find a pointer at + * symbol _bootphase1_version_pointer, perform slight sanity checks on the + * pointer, then use it. */ - void *bootrom_version = *(void**)0x1001fc; - if( bootrom_version < (void*)0x100000 || bootrom_version > (void*)0x101000 ) { + void *bootrom_version = *(void**)&_bootphase1_version_pointer; + if( bootrom_version < (void*)&_flash_start || bootrom_version >= (void*)&_flash_end ) { DbpString("bootrom version information appears invalid"); } else { FormatVersionInformation(temp, sizeof(temp), "bootrom: ", bootrom_version); @@ -645,6 +647,9 @@ void UsbPacketReceived(BYTE *packet, int len) case CMD_VERSION: SendVersion(); break; + case CMD_LF_SIMULATE_BIDIR: + SimulateTagLowFrequencyBidir(c->ext1, c->ext2); + break; #ifdef WITH_LCD case CMD_LCD_RESET: LCDReset();