mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
style
This commit is contained in:
parent
9ba8937f3c
commit
4e540053e9
28 changed files with 2007 additions and 2066 deletions
|
@ -119,6 +119,7 @@ const static vocabulary_t vocabulary[] = {
|
|||
{ 0, "data samples" },
|
||||
{ 1, "data save" },
|
||||
{ 1, "data setdebugmode" },
|
||||
{ 1, "data xor" },
|
||||
{ 1, "emv help" },
|
||||
{ 1, "emv list" },
|
||||
{ 1, "emv test" },
|
||||
|
@ -581,6 +582,7 @@ const static vocabulary_t vocabulary[] = {
|
|||
{ 0, "lf em 410x spoof" },
|
||||
{ 0, "lf em 410x clone" },
|
||||
{ 1, "lf em 4x05 help" },
|
||||
{ 0, "lf em 4x05 clonehelp" },
|
||||
{ 0, "lf em 4x05 brute" },
|
||||
{ 0, "lf em 4x05 chk" },
|
||||
{ 1, "lf em 4x05 config" },
|
||||
|
|
|
@ -444,7 +444,7 @@
|
|||
},
|
||||
"data help": {
|
||||
"command": "data help",
|
||||
"description": "----------- ------------------------- General------------------------- help This help ----------- ------------------------- Modulation------------------------- biphaserawdecode Biphase decode bin stream in DemodBuffer detectclock Detect ASK, FSK, NRZ, PSK clock rate of wave in GraphBuffer fsktonrz Convert fsk2 to nrz wave for alternate fsk demodulating (for weak fsk) manrawdecode Manchester decode binary stream in DemodBuffer modulation Identify LF signal for clock and modulation rawdemod Demodulate the data in the GraphBuffer and output binary ----------- ------------------------- Graph------------------------- askedgedetect Adjust Graph for manual ASK demod autocorr Autocorrelation over window dirthreshold Max rising higher up-thres/ Min falling lower down-thres decimate Decimate samples envelope Generate square envelope of samples undecimate Un-decimate samples hide Hide graph window hpf Remove DC offset from trace iir Apply IIR buttersworth filter on plot data grid overlay grid on graph window ltrim Trim samples from left of trace mtrim Trim out samples from the specified start to the specified stop norm Normalize max/min to +/-128 plot Show graph window cthreshold Average out all values between rtrim Trim samples from right of trace setgraphmarkers Set blue and orange marker in graph window shiftgraphzero Shift 0 for Graphed wave + or - shift value timescale Set cursor display timescale zerocrossings Count time between zero-crossings convertbitstream Convert GraphBuffer's 0/1 values to 127 / -127 getbitstream Convert GraphBuffer's >=1 values to 1 and <1 to 0 ----------- ------------------------- Operations------------------------- asn1 ASN1 decoder atr ATR lookup bin2hex Converts binary to hexadecimal bmap Convert hex value according a binary template clear Clears bigbuf on deviceside and graph window crypto Encrypt and decrypt data diff Diff of input files hex2bin Converts hexadecimal to binary load Load contents of file into graph window num Converts dec/hex/bin print Print the data in the DemodBuffer save Save signal trace data (from graph window) setdebugmode Set Debugging Level on client side --------------------------------------------------------------------------------------- data biphaserawdecode available offline: yes Biphase decode binary stream in DemodBuffer Converts 10 or 01 -> 1 and 11 or 00 -> 0 - must have binary sequence in DemodBuffer (run `data rawdemod --ar` before) - invert for Conditional Dephase Encoding (CDP) AKA Differential Manchester",
|
||||
"description": "----------- ------------------------- General------------------------- help This help ----------- ------------------------- Modulation------------------------- biphaserawdecode Biphase decode bin stream in DemodBuffer detectclock Detect ASK, FSK, NRZ, PSK clock rate of wave in GraphBuffer fsktonrz Convert fsk2 to nrz wave for alternate fsk demodulating (for weak fsk) manrawdecode Manchester decode binary stream in DemodBuffer modulation Identify LF signal for clock and modulation rawdemod Demodulate the data in the GraphBuffer and output binary ----------- ------------------------- Graph------------------------- askedgedetect Adjust Graph for manual ASK demod autocorr Autocorrelation over window dirthreshold Max rising higher up-thres/ Min falling lower down-thres decimate Decimate samples envelope Generate square envelope of samples undecimate Un-decimate samples hide Hide graph window hpf Remove DC offset from trace iir Apply IIR buttersworth filter on plot data grid overlay grid on graph window ltrim Trim samples from left of trace mtrim Trim out samples from the specified start to the specified stop norm Normalize max/min to +/-128 plot Show graph window cthreshold Average out all values between rtrim Trim samples from right of trace setgraphmarkers Set blue and orange marker in graph window shiftgraphzero Shift 0 for Graphed wave + or - shift value timescale Set cursor display timescale zerocrossings Count time between zero-crossings convertbitstream Convert GraphBuffer's 0/1 values to 127 / -127 getbitstream Convert GraphBuffer's >=1 values to 1 and <1 to 0 ----------- ------------------------- Operations------------------------- asn1 ASN1 decoder atr ATR lookup bin2hex Converts binary to hexadecimal bmap Convert hex value according a binary template clear Clears bigbuf on deviceside and graph window crypto Encrypt and decrypt data diff Diff of input files hex2bin Converts hexadecimal to binary load Load contents of file into graph window num Converts dec/hex/bin print Print the data in the DemodBuffer save Save signal trace data ( GraphBuffer ) setdebugmode Set Debugging Level on client side xor Xor a input string --------------------------------------------------------------------------------------- data biphaserawdecode available offline: yes Biphase decode binary stream in DemodBuffer Converts 10 or 01 -> 1 and 11 or 00 -> 0 - must have binary sequence in DemodBuffer (run `data rawdemod --ar` before) - invert for Conditional Dephase Encoding (CDP) AKA Differential Manchester",
|
||||
"notes": [
|
||||
"data biphaserawdecode -> decode biphase bitstream from the DemodBuffer",
|
||||
"data biphaserawdecode -oi -> decode biphase bitstream from the DemodBuffer, adjust offset, and invert output"
|
||||
|
@ -542,12 +542,12 @@
|
|||
"command": "data ltrim",
|
||||
"description": "Trim samples from left of trace",
|
||||
"notes": [
|
||||
"data ltrim -i 300 -> keep 300 - end"
|
||||
"data ltrim -i 300 -> remove from start 0 to index 300"
|
||||
],
|
||||
"offline": true,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-i, --idx <dec> from index to beginning trace"
|
||||
"-i, --idx <dec> index in graph buffer"
|
||||
],
|
||||
"usage": "data ltrim [-h] -i <dec>"
|
||||
},
|
||||
|
@ -579,9 +579,9 @@
|
|||
},
|
||||
"data mtrim": {
|
||||
"command": "data mtrim",
|
||||
"description": "Trim out samples from the specified start to the specified end point",
|
||||
"description": "Trim out samples from start 0 to `-s index` AND from `-e index` to end of graph buffer",
|
||||
"notes": [
|
||||
"data mtrim -s 1000 -e 2000 -> keep between 1000 and 2000"
|
||||
"data mtrim -s 1000 -e 2000 -> keep all between index 1000 and 2000"
|
||||
],
|
||||
"offline": true,
|
||||
"options": [
|
||||
|
@ -679,12 +679,12 @@
|
|||
"command": "data rtrim",
|
||||
"description": "Trim samples from right of trace",
|
||||
"notes": [
|
||||
"data rtrim -i 4000 -> keep 0 - 4000"
|
||||
"data rtrim -i 4000 -> remove from index 4000 to end of graph buffer"
|
||||
],
|
||||
"offline": true,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-i, --idx <dec> from index to end trace"
|
||||
"-i, --idx <dec> index in graph buffer"
|
||||
],
|
||||
"usage": "data rtrim [-h] -i <dec>"
|
||||
},
|
||||
|
@ -792,6 +792,21 @@
|
|||
],
|
||||
"usage": "data undecimate [-h] [-n <dec>]"
|
||||
},
|
||||
"data xor": {
|
||||
"command": "data xor",
|
||||
"description": "takes input string and xor string. Perform xor on it. If no xor string, try the most reoccuring value to xor against",
|
||||
"notes": [
|
||||
"data xor -d 99aabbcc8888888888",
|
||||
"data xor -d 99aabbcc --xor 88888888"
|
||||
],
|
||||
"offline": true,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-d, --data <hex> input hex string",
|
||||
"-x, --xor <str> input xor string"
|
||||
],
|
||||
"usage": "data xor [-h] -d <hex> [-x <str>]"
|
||||
},
|
||||
"data zerocrossings": {
|
||||
"command": "data zerocrossings",
|
||||
"description": "Count time between zero-crossings",
|
||||
|
@ -1355,7 +1370,7 @@
|
|||
},
|
||||
"hf 14a sniff": {
|
||||
"command": "hf 14a sniff",
|
||||
"description": "Collect data from the field and save into command buffer. Buffer accessible from command `hf 14a list`",
|
||||
"description": "Sniff the communication between Hitag reader and tag. Use `hf 14a list` to view collected data.",
|
||||
"notes": [
|
||||
"hf 14a sniff -c -r"
|
||||
],
|
||||
|
@ -1544,7 +1559,7 @@
|
|||
},
|
||||
"hf 14b sniff": {
|
||||
"command": "hf 14b sniff",
|
||||
"description": "Sniff the communication reader and tag",
|
||||
"description": "Sniff the communication between reader and tag. Use `hf 14b list` to view collected data.",
|
||||
"notes": [
|
||||
"hf 14b sniff"
|
||||
],
|
||||
|
@ -4582,7 +4597,7 @@
|
|||
"--2k MIFARE Classic/Plus 2k",
|
||||
"--4k MIFARE Classic 4k / S70",
|
||||
"-v, --verbose verbose output",
|
||||
"--sk Save extracted keys to file"
|
||||
"--sk Save extracted keys to binary file"
|
||||
],
|
||||
"usage": "hf mf eview [-hv] [--mini] [--1k] [--2k] [--4k] [--sk]"
|
||||
},
|
||||
|
@ -4753,15 +4768,17 @@
|
|||
"description": "Read info about magic gen4 GTU card.",
|
||||
"notes": [
|
||||
"hf mf ginfo -> get info with default password 00000000",
|
||||
"hf mf ginfo --pwd 01020304 -> get info with password"
|
||||
"hf mf ginfo --pwd 01020304 -> get info with password",
|
||||
"hf mf ginfo -d 00000000000002090978009102BDAC19131011121314151604001800FF0002FD -v -> decode config block"
|
||||
],
|
||||
"offline": false,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-v, --verbose verbose output",
|
||||
"-p, --pwd <hex> password 4bytes"
|
||||
"-p, --pwd <hex> password 4 bytes",
|
||||
"-d, --data <hex> config bytes 32 bytes"
|
||||
],
|
||||
"usage": "hf mf ginfo [-hv] [-p <hex>]"
|
||||
"usage": "hf mf ginfo [-hv] [-p <hex>] [-d <hex>]"
|
||||
},
|
||||
"hf mf gload": {
|
||||
"command": "hf mf gload",
|
||||
|
@ -5263,7 +5280,7 @@
|
|||
"-h, --help This help",
|
||||
"-f, --file <fn> Specify a filename for dump file",
|
||||
"-v, --verbose verbose output",
|
||||
"--sk Save extracted keys to file"
|
||||
"--sk Save extracted keys to binary file"
|
||||
],
|
||||
"usage": "hf mf view [-hv] -f <fn> [--sk]"
|
||||
},
|
||||
|
@ -5763,7 +5780,7 @@
|
|||
"-m, --cmode <plain|mac|encrypt> Communicaton mode",
|
||||
"-c, --ccset <native|niso|iso> Communicaton command set",
|
||||
"--schann <d40|ev1|ev2|lrp> Secure channel",
|
||||
"--aid <hex> Application ID of delegated application (3 hex bytes, big endian)"
|
||||
"--aid <hex> Application ID to delete (3 hex bytes, big endian)"
|
||||
],
|
||||
"usage": "hf mfdes deleteapp [-hav] [-n <dec>] [-t <DES|2TDEA|3TDEA|AES>] [-k <hex>] [--kdf <none|AN10922|gallagher>] [-i <hex>] [-m <plain|mac|encrypt>] [-c <native|niso|iso>] [--schann <d40|ev1|ev2|lrp>] [--aid <hex>]"
|
||||
},
|
||||
|
@ -8466,6 +8483,22 @@
|
|||
],
|
||||
"usage": "lf em 410x watch [-h]"
|
||||
},
|
||||
"lf em 4x05 brute": {
|
||||
"command": "lf em 4x05 brute",
|
||||
"description": "This command tries to bruteforce the password of a EM4205/4305/4469/4569 The loop is running on device side, press Proxmark3 button to abort",
|
||||
"notes": [
|
||||
"Note: if you get many false positives, change position on the antennalf em 4x05 brute",
|
||||
"lf em 4x05 brute -n 1 -> stop after first candidate found",
|
||||
"lf em 4x05 brute -s 000022AA -> start at 000022AA"
|
||||
],
|
||||
"offline": false,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-s, --start <hex> Start bruteforce enumeration from this password value",
|
||||
"-n <dec> Stop after having found n candidates. Default: 0 (infinite)"
|
||||
],
|
||||
"usage": "lf em 4x05 brute [-h] [-s <hex>] [-n <dec>]"
|
||||
},
|
||||
"lf em 4x05 chk": {
|
||||
"command": "lf em 4x05 chk",
|
||||
"description": "This command uses a dictionary attack against EM4205/4305/4469/4569",
|
||||
|
@ -8492,7 +8525,7 @@
|
|||
"options": [
|
||||
"-h, --help This help"
|
||||
],
|
||||
"usage": "lf em ex05 config [-h]"
|
||||
"usage": "lf em 4x05 config [-h]"
|
||||
},
|
||||
"lf em 4x05 demod": {
|
||||
"command": "lf em 4x05 demod",
|
||||
|
@ -8525,19 +8558,15 @@
|
|||
},
|
||||
"lf em 4x05 help": {
|
||||
"command": "lf em 4x05 help",
|
||||
"description": "----------- ----------------------- General ----------------------- help This help ----------- ----------------------- Operations ----------------------- config Create common configuration words demod Demodulate a EM4x05/EM4x69 tag from the GraphBuffer sniff Attempt to recover em4x05 commands from sample buffer view Display content from tag dump file --------------------------------------------------------------------------------------- lf em 4x05 brute available offline: no This command tries to bruteforce the password of a EM4205/4305/4469/4569 The loop is running on device side, press Proxmark3 button to abort",
|
||||
"description": "----------- ----------------------- General ----------------------- help This help ----------- ----------------------- Operations ----------------------- config Create common configuration words demod Demodulate a EM4x05/EM4x69 tag from the GraphBuffer sniff Attempt to recover em4x05 commands from sample buffer view Display content from tag dump file --------------------------------------------------------------------------------------- lf em 4x05 clonehelp available offline: no Display a list of available commands for cloning specific techs on EM4305/4469 tags",
|
||||
"notes": [
|
||||
"Note: if you get many false positives, change position on the antennalf em 4x05 brute",
|
||||
"lf em 4x05 brute -n 1 -> stop after first candidate found",
|
||||
"lf em 4x05 brute -s 000022AA -> start at 000022AA"
|
||||
"lf em 4x05 clonehelp"
|
||||
],
|
||||
"offline": true,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-s, --start <hex> Start bruteforce enumeration from this password value",
|
||||
"-n <dec> Stop after having found n candidates. Default: 0 (infinite)"
|
||||
"-h, --help This help"
|
||||
],
|
||||
"usage": "lf em 4x05 brute [-h] [-s <hex>] [-n <dec>]"
|
||||
"usage": "lf em 4x05 clonehelp [-h]"
|
||||
},
|
||||
"lf em 4x05 info": {
|
||||
"command": "lf em 4x05 info",
|
||||
|
@ -8616,7 +8645,7 @@
|
|||
"-f, --file <fn> Specify a filename for dump file",
|
||||
"-v, --verbose Verbose output"
|
||||
],
|
||||
"usage": "lf em ex05 view [-hv] -f <fn>"
|
||||
"usage": "lf em 4x05 view [-hv] -f <fn>"
|
||||
},
|
||||
"lf em 4x05 wipe": {
|
||||
"command": "lf em 4x05 wipe",
|
||||
|
@ -9540,7 +9569,7 @@
|
|||
},
|
||||
"lf hitag sniff": {
|
||||
"command": "lf hitag sniff",
|
||||
"description": "Sniff traffic between Hitag reader and tag. Use `lf hitag list` to view collected data.",
|
||||
"description": "Sniff the communication between reader and tag. Use `lf hitag list` to view collected data.",
|
||||
"notes": [
|
||||
"lf hitag sniff"
|
||||
],
|
||||
|
@ -12566,8 +12595,8 @@
|
|||
}
|
||||
},
|
||||
"metadata": {
|
||||
"commands_extracted": 725,
|
||||
"commands_extracted": 727,
|
||||
"extracted_by": "PM3Help2JSON v1.00",
|
||||
"extracted_on": "2024-03-19T10:15:48"
|
||||
"extracted_on": "2024-04-07T09:37:51"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -136,8 +136,9 @@ Check column "offline" for their availability.
|
|||
|`data num `|Y |`Converts dec/hex/bin`
|
||||
|`data print `|Y |`Print the data in the DemodBuffer`
|
||||
|`data samples `|N |`Get raw samples for graph window ( GraphBuffer )`
|
||||
|`data save `|Y |`Save signal trace data (from graph window)`
|
||||
|`data save `|Y |`Save signal trace data ( GraphBuffer )`
|
||||
|`data setdebugmode `|Y |`Set Debugging Level on client side`
|
||||
|`data xor `|Y |`Xor a input string`
|
||||
|
||||
|
||||
### emv
|
||||
|
@ -858,7 +859,7 @@ Check column "offline" for their availability.
|
|||
|`lf awid help `|Y |`this help`
|
||||
|`lf awid demod `|Y |`demodulate an AWID FSK tag from the GraphBuffer`
|
||||
|`lf awid reader `|N |`attempt to read and extract tag data`
|
||||
|`lf awid clone `|N |`clone AWID tag to T55x7 or Q5/T5555`
|
||||
|`lf awid clone `|N |`clone AWID tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf awid sim `|N |`simulate AWID tag`
|
||||
|`lf awid brute `|N |`bruteforce card number against reader`
|
||||
|`lf awid watch `|N |`continuously watch for cards. Reader mode`
|
||||
|
@ -884,7 +885,7 @@ Check column "offline" for their availability.
|
|||
|`lf destron help `|Y |`This help`
|
||||
|`lf destron demod `|Y |`demodulate an Destron tag from the GraphBuffer`
|
||||
|`lf destron reader `|N |`attempt to read and extract tag data`
|
||||
|`lf destron clone `|N |`clone Destron tag to T55x7`
|
||||
|`lf destron clone `|N |`clone Destron tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf destron sim `|N |`simulate Destron tag`
|
||||
|
||||
|
||||
|
@ -910,7 +911,7 @@ Check column "offline" for their availability.
|
|||
|`lf em 410x brute `|N |`reader bruteforce attack by simulating EM410x tags`
|
||||
|`lf em 410x watch `|N |`watches for EM410x 125/134 kHz tags`
|
||||
|`lf em 410x spoof `|N |`watches for EM410x 125/134 kHz tags, and replays them`
|
||||
|`lf em 410x clone `|N |`write EM410x Tag ID to T55x7 or Q5/T5555 tag`
|
||||
|`lf em 410x clone `|N |`clone EM410x Tag ID to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|
||||
|
||||
### lf em 4x05
|
||||
|
@ -920,6 +921,7 @@ Check column "offline" for their availability.
|
|||
|command |offline |description
|
||||
|------- |------- |-----------
|
||||
|`lf em 4x05 help `|Y |`This help`
|
||||
|`lf em 4x05 clonehelp `|N |`Shows the available clone commands`
|
||||
|`lf em 4x05 brute `|N |`Bruteforce password`
|
||||
|`lf em 4x05 chk `|N |`Check passwords from dictionary`
|
||||
|`lf em 4x05 config `|Y |`Create common configuration words`
|
||||
|
@ -986,7 +988,7 @@ Check column "offline" for their availability.
|
|||
|`lf fdxb help `|Y |`this help`
|
||||
|`lf fdxb demod `|Y |`demodulate a FDX-B ISO11784/85 tag from the GraphBuffer`
|
||||
|`lf fdxb reader `|N |`attempt to read at 134kHz and extract tag data`
|
||||
|`lf fdxb clone `|N |`clone animal ID tag to T55x7 or Q5/T5555`
|
||||
|`lf fdxb clone `|N |`clone animal ID tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf fdxb sim `|N |`simulate Animal ID tag`
|
||||
|
||||
|
||||
|
@ -999,7 +1001,7 @@ Check column "offline" for their availability.
|
|||
|`lf gallagher help `|Y |`This help`
|
||||
|`lf gallagher demod `|Y |`demodulate an GALLAGHER tag from the GraphBuffer`
|
||||
|`lf gallagher reader `|N |`attempt to read and extract tag data`
|
||||
|`lf gallagher clone `|N |`clone GALLAGHER tag to T55x7`
|
||||
|`lf gallagher clone `|N |`clone GALLAGHER tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf gallagher sim `|N |`simulate GALLAGHER tag`
|
||||
|
||||
|
||||
|
@ -1025,7 +1027,7 @@ Check column "offline" for their availability.
|
|||
|`lf hid help `|Y |`this help`
|
||||
|`lf hid demod `|Y |`demodulate HID Prox tag from the GraphBuffer`
|
||||
|`lf hid reader `|N |`attempt to read and extract tag data`
|
||||
|`lf hid clone `|N |`clone HID tag to T55x7`
|
||||
|`lf hid clone `|N |`clone HID tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf hid sim `|N |`simulate HID tag`
|
||||
|`lf hid brute `|N |`bruteforce facility code or card number against reader`
|
||||
|`lf hid watch `|N |`continuously watch for cards. Reader mode`
|
||||
|
@ -1103,7 +1105,7 @@ Check column "offline" for their availability.
|
|||
|`lf jablotron help `|Y |`This help`
|
||||
|`lf jablotron demod `|Y |`demodulate an Jablotron tag from the GraphBuffer`
|
||||
|`lf jablotron reader `|N |`attempt to read and extract tag data`
|
||||
|`lf jablotron clone `|N |`clone jablotron tag to T55x7 or Q5/T5555`
|
||||
|`lf jablotron clone `|N |`clone jablotron tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf jablotron sim `|N |`simulate jablotron tag`
|
||||
|
||||
|
||||
|
@ -1116,7 +1118,7 @@ Check column "offline" for their availability.
|
|||
|`lf keri help `|Y |`This help`
|
||||
|`lf keri demod `|Y |`demodulate an KERI tag from the GraphBuffer`
|
||||
|`lf keri reader `|N |`attempt to read and extract tag data`
|
||||
|`lf keri clone `|N |`clone KERI tag to T55x7 or Q5/T5555`
|
||||
|`lf keri clone `|N |`clone KERI tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf keri sim `|N |`simulate KERI tag`
|
||||
|
||||
|
||||
|
@ -1142,7 +1144,7 @@ Check column "offline" for their availability.
|
|||
|`lf nedap help `|Y |`This help`
|
||||
|`lf nedap demod `|Y |`demodulate Nedap tag from the GraphBuffer`
|
||||
|`lf nedap reader `|N |`attempt to read and extract tag data`
|
||||
|`lf nedap clone `|N |`clone Nedap tag to T55x7 or Q5/T5555`
|
||||
|`lf nedap clone `|N |`clone Nedap tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf nedap sim `|N |`simulate Nedap tag`
|
||||
|
||||
|
||||
|
@ -1155,7 +1157,7 @@ Check column "offline" for their availability.
|
|||
|`lf nexwatch help `|Y |`This help`
|
||||
|`lf nexwatch demod `|Y |`demodulate a NexWatch tag (nexkey, quadrakey) from the GraphBuffer`
|
||||
|`lf nexwatch reader `|N |`attempt to read and extract tag data`
|
||||
|`lf nexwatch clone `|N |`clone NexWatch tag to T55x7`
|
||||
|`lf nexwatch clone `|N |`clone NexWatch tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf nexwatch sim `|N |`simulate NexWatch tag`
|
||||
|
||||
|
||||
|
@ -1168,7 +1170,7 @@ Check column "offline" for their availability.
|
|||
|`lf noralsy help `|Y |`This help`
|
||||
|`lf noralsy demod `|Y |`demodulate an Noralsy tag from the GraphBuffer`
|
||||
|`lf noralsy reader `|N |`attempt to read and extract tag data`
|
||||
|`lf noralsy clone `|N |`clone Noralsy tag to T55x7 or Q5/T5555`
|
||||
|`lf noralsy clone `|N |`clone Noralsy tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf noralsy sim `|N |`simulate Noralsy tag`
|
||||
|
||||
|
||||
|
@ -1181,7 +1183,7 @@ Check column "offline" for their availability.
|
|||
|`lf pac help `|Y |`This help`
|
||||
|`lf pac demod `|Y |`demodulate a PAC tag from the GraphBuffer`
|
||||
|`lf pac reader `|N |`attempt to read and extract tag data`
|
||||
|`lf pac clone `|N |`clone PAC tag to T55x7`
|
||||
|`lf pac clone `|N |`clone PAC tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf pac sim `|N |`simulate PAC tag`
|
||||
|
||||
|
||||
|
@ -1194,7 +1196,7 @@ Check column "offline" for their availability.
|
|||
|`lf paradox help `|Y |`This help`
|
||||
|`lf paradox demod `|Y |`demodulate a Paradox FSK tag from the GraphBuffer`
|
||||
|`lf paradox reader `|N |`attempt to read and extract tag data`
|
||||
|`lf paradox clone `|N |`clone paradox tag`
|
||||
|`lf paradox clone `|N |`clone paradox tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf paradox sim `|N |`simulate paradox tag`
|
||||
|
||||
|
||||
|
@ -1219,7 +1221,7 @@ Check column "offline" for their availability.
|
|||
|`lf presco help `|Y |`This help`
|
||||
|`lf presco demod `|Y |`demodulate Presco tag from the GraphBuffer`
|
||||
|`lf presco reader `|N |`attempt to read and extract tag data`
|
||||
|`lf presco clone `|N |`clone presco tag to T55x7 or Q5/T5555`
|
||||
|`lf presco clone `|N |`clone presco tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf presco sim `|N |`simulate presco tag`
|
||||
|
||||
|
||||
|
@ -1232,7 +1234,7 @@ Check column "offline" for their availability.
|
|||
|`lf pyramid help `|Y |`this help`
|
||||
|`lf pyramid demod `|Y |`demodulate a Pyramid FSK tag from the GraphBuffer`
|
||||
|`lf pyramid reader `|N |`attempt to read and extract tag data`
|
||||
|`lf pyramid clone `|N |`clone pyramid tag to T55x7 or Q5/T5555`
|
||||
|`lf pyramid clone `|N |`clone pyramid tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf pyramid sim `|N |`simulate pyramid tag`
|
||||
|
||||
|
||||
|
@ -1245,7 +1247,7 @@ Check column "offline" for their availability.
|
|||
|`lf securakey help `|Y |`This help`
|
||||
|`lf securakey demod `|Y |`demodulate an Securakey tag from the GraphBuffer`
|
||||
|`lf securakey reader `|N |`attempt to read and extract tag data`
|
||||
|`lf securakey clone `|N |`clone Securakey tag to T55x7`
|
||||
|`lf securakey clone `|N |`clone Securakey tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf securakey sim `|N |`simulate Securakey tag`
|
||||
|
||||
|
||||
|
@ -1300,7 +1302,7 @@ Check column "offline" for their availability.
|
|||
|`lf viking help `|Y |`This help`
|
||||
|`lf viking demod `|Y |`demodulate a Viking tag from the GraphBuffer`
|
||||
|`lf viking reader `|N |`attempt to read and extract tag data`
|
||||
|`lf viking clone `|N |`clone Viking tag to T55x7 or Q5/T5555`
|
||||
|`lf viking clone `|N |`clone Viking tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf viking sim `|N |`simulate Viking tag`
|
||||
|
||||
|
||||
|
@ -1313,7 +1315,7 @@ Check column "offline" for their availability.
|
|||
|`lf visa2000 help `|Y |`This help`
|
||||
|`lf visa2000 demod `|Y |`demodulate an VISA2000 tag from the GraphBuffer`
|
||||
|`lf visa2000 reader `|N |`attempt to read and extract tag data`
|
||||
|`lf visa2000 clone `|N |`clone Visa2000 tag to T55x7 or Q5/T5555`
|
||||
|`lf visa2000 clone `|N |`clone Visa2000 tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf visa2000 sim `|N |`simulate Visa2000 tag`
|
||||
|
||||
|
||||
|
|
|
@ -41,8 +41,7 @@ extern "C" {
|
|||
/**
|
||||
* Rounding mode used when converting to cl_half.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
CL_HALF_RTE, // round to nearest even
|
||||
CL_HALF_RTZ, // round towards zero
|
||||
CL_HALF_RTP, // round towards positive infinity
|
||||
|
@ -59,20 +58,14 @@ typedef enum
|
|||
* Utility to deal with values that overflow when converting to half precision.
|
||||
*/
|
||||
static inline cl_half cl_half_handle_overflow(cl_half_rounding_mode rounding_mode,
|
||||
uint16_t sign)
|
||||
{
|
||||
if (rounding_mode == CL_HALF_RTZ)
|
||||
{
|
||||
uint16_t sign) {
|
||||
if (rounding_mode == CL_HALF_RTZ) {
|
||||
// Round overflow towards zero -> largest finite number (preserving sign)
|
||||
return (sign << 15) | CL_HALF_MAX_FINITE_MAG;
|
||||
}
|
||||
else if (rounding_mode == CL_HALF_RTP && sign)
|
||||
{
|
||||
} else if (rounding_mode == CL_HALF_RTP && sign) {
|
||||
// Round negative overflow towards positive infinity -> most negative finite number
|
||||
return (1 << 15) | CL_HALF_MAX_FINITE_MAG;
|
||||
}
|
||||
else if (rounding_mode == CL_HALF_RTN && !sign)
|
||||
{
|
||||
} else if (rounding_mode == CL_HALF_RTN && !sign) {
|
||||
// Round positive overflow towards negative infinity -> largest finite number
|
||||
return CL_HALF_MAX_FINITE_MAG;
|
||||
}
|
||||
|
@ -85,15 +78,11 @@ static inline cl_half cl_half_handle_overflow(cl_half_rounding_mode rounding_mod
|
|||
* Utility to deal with values that underflow when converting to half precision.
|
||||
*/
|
||||
static inline cl_half cl_half_handle_underflow(cl_half_rounding_mode rounding_mode,
|
||||
uint16_t sign)
|
||||
{
|
||||
if (rounding_mode == CL_HALF_RTP && !sign)
|
||||
{
|
||||
uint16_t sign) {
|
||||
if (rounding_mode == CL_HALF_RTP && !sign) {
|
||||
// Round underflow towards positive infinity -> smallest positive value
|
||||
return (sign << 15) | 1;
|
||||
}
|
||||
else if (rounding_mode == CL_HALF_RTN && sign)
|
||||
{
|
||||
} else if (rounding_mode == CL_HALF_RTN && sign) {
|
||||
// Round underflow towards negative infinity -> largest negative value
|
||||
return (sign << 15) | 1;
|
||||
}
|
||||
|
@ -106,11 +95,9 @@ static inline cl_half cl_half_handle_underflow(cl_half_rounding_mode rounding_mo
|
|||
/**
|
||||
* Convert a cl_float to a cl_half.
|
||||
*/
|
||||
static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode rounding_mode)
|
||||
{
|
||||
static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode rounding_mode) {
|
||||
// Type-punning to get direct access to underlying bits
|
||||
union
|
||||
{
|
||||
union {
|
||||
cl_float f;
|
||||
uint32_t i;
|
||||
} f32;
|
||||
|
@ -133,43 +120,35 @@ static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode round
|
|||
uint32_t lsb_pos = CL_FLT_MANT_DIG - CL_HALF_MANT_DIG;
|
||||
|
||||
// Check for NaN / infinity
|
||||
if (f_exp == 0xFF)
|
||||
{
|
||||
if (f_mant)
|
||||
{
|
||||
if (f_exp == 0xFF) {
|
||||
if (f_mant) {
|
||||
// NaN -> propagate mantissa and silence it
|
||||
uint16_t h_mant = (uint16_t)(f_mant >> lsb_pos);
|
||||
h_mant |= 0x200;
|
||||
return (sign << 15) | CL_HALF_EXP_MASK | h_mant;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// Infinity -> zero mantissa
|
||||
return (sign << 15) | CL_HALF_EXP_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
// Check for zero
|
||||
if (!f_exp && !f_mant)
|
||||
{
|
||||
if (!f_exp && !f_mant) {
|
||||
return (sign << 15);
|
||||
}
|
||||
|
||||
// Check for overflow
|
||||
if (exp >= CL_HALF_MAX_EXP)
|
||||
{
|
||||
if (exp >= CL_HALF_MAX_EXP) {
|
||||
return cl_half_handle_overflow(rounding_mode, sign);
|
||||
}
|
||||
|
||||
// Check for underflow
|
||||
if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1))
|
||||
{
|
||||
if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1)) {
|
||||
return cl_half_handle_underflow(rounding_mode, sign);
|
||||
}
|
||||
|
||||
// Check for value that will become denormal
|
||||
if (exp < -14)
|
||||
{
|
||||
if (exp < -14) {
|
||||
// Denormal -> include the implicit 1 from the FP32 mantissa
|
||||
h_exp = 0;
|
||||
f_mant |= 1 << (CL_FLT_MANT_DIG - 1);
|
||||
|
@ -184,16 +163,12 @@ static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode round
|
|||
// Check whether we need to round
|
||||
uint32_t halfway = 1 << (lsb_pos - 1);
|
||||
uint32_t mask = (halfway << 1) - 1;
|
||||
switch (rounding_mode)
|
||||
{
|
||||
switch (rounding_mode) {
|
||||
case CL_HALF_RTE:
|
||||
if ((f_mant & mask) > halfway)
|
||||
{
|
||||
if ((f_mant & mask) > halfway) {
|
||||
// More than halfway -> round up
|
||||
h_mant += 1;
|
||||
}
|
||||
else if ((f_mant & mask) == halfway)
|
||||
{
|
||||
} else if ((f_mant & mask) == halfway) {
|
||||
// Exactly halfway -> round to nearest even
|
||||
if (h_mant & 0x1)
|
||||
h_mant += 1;
|
||||
|
@ -203,15 +178,13 @@ static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode round
|
|||
// Mantissa has already been truncated -> do nothing
|
||||
break;
|
||||
case CL_HALF_RTP:
|
||||
if ((f_mant & mask) && !sign)
|
||||
{
|
||||
if ((f_mant & mask) && !sign) {
|
||||
// Round positive numbers up
|
||||
h_mant += 1;
|
||||
}
|
||||
break;
|
||||
case CL_HALF_RTN:
|
||||
if ((f_mant & mask) && sign)
|
||||
{
|
||||
if ((f_mant & mask) && sign) {
|
||||
// Round negative numbers down
|
||||
h_mant += 1;
|
||||
}
|
||||
|
@ -219,8 +192,7 @@ static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode round
|
|||
}
|
||||
|
||||
// Check for mantissa overflow
|
||||
if (h_mant & 0x400)
|
||||
{
|
||||
if (h_mant & 0x400) {
|
||||
h_exp += 1;
|
||||
h_mant = 0;
|
||||
}
|
||||
|
@ -232,11 +204,9 @@ static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode round
|
|||
/**
|
||||
* Convert a cl_double to a cl_half.
|
||||
*/
|
||||
static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rounding_mode)
|
||||
{
|
||||
static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rounding_mode) {
|
||||
// Type-punning to get direct access to underlying bits
|
||||
union
|
||||
{
|
||||
union {
|
||||
cl_double d;
|
||||
uint64_t i;
|
||||
} f64;
|
||||
|
@ -259,43 +229,35 @@ static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rou
|
|||
uint32_t lsb_pos = CL_DBL_MANT_DIG - CL_HALF_MANT_DIG;
|
||||
|
||||
// Check for NaN / infinity
|
||||
if (d_exp == 0x7FF)
|
||||
{
|
||||
if (d_mant)
|
||||
{
|
||||
if (d_exp == 0x7FF) {
|
||||
if (d_mant) {
|
||||
// NaN -> propagate mantissa and silence it
|
||||
uint16_t h_mant = (uint16_t)(d_mant >> lsb_pos);
|
||||
h_mant |= 0x200;
|
||||
return (sign << 15) | CL_HALF_EXP_MASK | h_mant;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// Infinity -> zero mantissa
|
||||
return (sign << 15) | CL_HALF_EXP_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
// Check for zero
|
||||
if (!d_exp && !d_mant)
|
||||
{
|
||||
if (!d_exp && !d_mant) {
|
||||
return (sign << 15);
|
||||
}
|
||||
|
||||
// Check for overflow
|
||||
if (exp >= CL_HALF_MAX_EXP)
|
||||
{
|
||||
if (exp >= CL_HALF_MAX_EXP) {
|
||||
return cl_half_handle_overflow(rounding_mode, sign);
|
||||
}
|
||||
|
||||
// Check for underflow
|
||||
if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1))
|
||||
{
|
||||
if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1)) {
|
||||
return cl_half_handle_underflow(rounding_mode, sign);
|
||||
}
|
||||
|
||||
// Check for value that will become denormal
|
||||
if (exp < -14)
|
||||
{
|
||||
if (exp < -14) {
|
||||
// Include the implicit 1 from the FP64 mantissa
|
||||
h_exp = 0;
|
||||
d_mant |= (uint64_t)1 << (CL_DBL_MANT_DIG - 1);
|
||||
|
@ -310,16 +272,12 @@ static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rou
|
|||
// Check whether we need to round
|
||||
uint64_t halfway = (uint64_t)1 << (lsb_pos - 1);
|
||||
uint64_t mask = (halfway << 1) - 1;
|
||||
switch (rounding_mode)
|
||||
{
|
||||
switch (rounding_mode) {
|
||||
case CL_HALF_RTE:
|
||||
if ((d_mant & mask) > halfway)
|
||||
{
|
||||
if ((d_mant & mask) > halfway) {
|
||||
// More than halfway -> round up
|
||||
h_mant += 1;
|
||||
}
|
||||
else if ((d_mant & mask) == halfway)
|
||||
{
|
||||
} else if ((d_mant & mask) == halfway) {
|
||||
// Exactly halfway -> round to nearest even
|
||||
if (h_mant & 0x1)
|
||||
h_mant += 1;
|
||||
|
@ -329,15 +287,13 @@ static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rou
|
|||
// Mantissa has already been truncated -> do nothing
|
||||
break;
|
||||
case CL_HALF_RTP:
|
||||
if ((d_mant & mask) && !sign)
|
||||
{
|
||||
if ((d_mant & mask) && !sign) {
|
||||
// Round positive numbers up
|
||||
h_mant += 1;
|
||||
}
|
||||
break;
|
||||
case CL_HALF_RTN:
|
||||
if ((d_mant & mask) && sign)
|
||||
{
|
||||
if ((d_mant & mask) && sign) {
|
||||
// Round negative numbers down
|
||||
h_mant += 1;
|
||||
}
|
||||
|
@ -345,8 +301,7 @@ static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rou
|
|||
}
|
||||
|
||||
// Check for mantissa overflow
|
||||
if (h_mant & 0x400)
|
||||
{
|
||||
if (h_mant & 0x400) {
|
||||
h_exp += 1;
|
||||
h_mant = 0;
|
||||
}
|
||||
|
@ -358,11 +313,9 @@ static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rou
|
|||
/**
|
||||
* Convert a cl_half to a cl_float.
|
||||
*/
|
||||
static inline cl_float cl_half_to_float(cl_half h)
|
||||
{
|
||||
static inline cl_float cl_half_to_float(cl_half h) {
|
||||
// Type-punning to get direct access to underlying bits
|
||||
union
|
||||
{
|
||||
union {
|
||||
cl_float f;
|
||||
uint32_t i;
|
||||
} f32;
|
||||
|
@ -381,18 +334,14 @@ static inline cl_float cl_half_to_float(cl_half h)
|
|||
uint32_t f_exp = exp + CL_FLT_MAX_EXP - 1;
|
||||
|
||||
// Check for NaN / infinity
|
||||
if (h_exp == 0x1F)
|
||||
{
|
||||
if (h_mant)
|
||||
{
|
||||
if (h_exp == 0x1F) {
|
||||
if (h_mant) {
|
||||
// NaN -> propagate mantissa and silence it
|
||||
uint32_t f_mant = h_mant << (CL_FLT_MANT_DIG - CL_HALF_MANT_DIG);
|
||||
f_mant |= 0x400000;
|
||||
f32.i = (sign << 31) | 0x7F800000 | f_mant;
|
||||
return f32.f;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// Infinity -> zero mantissa
|
||||
f32.i = (sign << 31) | 0x7F800000;
|
||||
return f32.f;
|
||||
|
@ -400,21 +349,16 @@ static inline cl_float cl_half_to_float(cl_half h)
|
|||
}
|
||||
|
||||
// Check for zero / denormal
|
||||
if (h_exp == 0)
|
||||
{
|
||||
if (h_mant == 0)
|
||||
{
|
||||
if (h_exp == 0) {
|
||||
if (h_mant == 0) {
|
||||
// Zero -> zero exponent
|
||||
f_exp = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// Denormal -> normalize it
|
||||
// - Shift mantissa to make most-significant 1 implicit
|
||||
// - Adjust exponent accordingly
|
||||
uint32_t shift = 0;
|
||||
while ((h_mant & 0x400) == 0)
|
||||
{
|
||||
while ((h_mant & 0x400) == 0) {
|
||||
h_mant <<= 1;
|
||||
shift++;
|
||||
}
|
||||
|
|
|
@ -555,8 +555,7 @@ typedef unsigned int cl_GLenum;
|
|||
/* Define cl_vector types */
|
||||
|
||||
/* ---- cl_charn ---- */
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_char CL_ALIGNED(2) s[2];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_char x, y; };
|
||||
|
@ -568,8 +567,7 @@ typedef union
|
|||
#endif
|
||||
} cl_char2;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_char CL_ALIGNED(4) s[4];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_char x, y, z, w; };
|
||||
|
@ -587,8 +585,7 @@ typedef union
|
|||
/* cl_char3 is identical in size, alignment and behavior to cl_char4. See section 6.1.5. */
|
||||
typedef cl_char4 cl_char3;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_char CL_ALIGNED(8) s[8];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_char x, y, z, w; };
|
||||
|
@ -606,8 +603,7 @@ typedef union
|
|||
#endif
|
||||
} cl_char8;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_char CL_ALIGNED(16) s[16];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_char x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
|
||||
|
@ -630,8 +626,7 @@ typedef union
|
|||
|
||||
|
||||
/* ---- cl_ucharn ---- */
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_uchar CL_ALIGNED(2) s[2];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_uchar x, y; };
|
||||
|
@ -643,8 +638,7 @@ typedef union
|
|||
#endif
|
||||
} cl_uchar2;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_uchar CL_ALIGNED(4) s[4];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_uchar x, y, z, w; };
|
||||
|
@ -662,8 +656,7 @@ typedef union
|
|||
/* cl_uchar3 is identical in size, alignment and behavior to cl_uchar4. See section 6.1.5. */
|
||||
typedef cl_uchar4 cl_uchar3;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_uchar CL_ALIGNED(8) s[8];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_uchar x, y, z, w; };
|
||||
|
@ -681,8 +674,7 @@ typedef union
|
|||
#endif
|
||||
} cl_uchar8;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_uchar CL_ALIGNED(16) s[16];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_uchar x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
|
||||
|
@ -705,8 +697,7 @@ typedef union
|
|||
|
||||
|
||||
/* ---- cl_shortn ---- */
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_short CL_ALIGNED(4) s[2];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_short x, y; };
|
||||
|
@ -718,8 +709,7 @@ typedef union
|
|||
#endif
|
||||
} cl_short2;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_short CL_ALIGNED(8) s[4];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_short x, y, z, w; };
|
||||
|
@ -737,8 +727,7 @@ typedef union
|
|||
/* cl_short3 is identical in size, alignment and behavior to cl_short4. See section 6.1.5. */
|
||||
typedef cl_short4 cl_short3;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_short CL_ALIGNED(16) s[8];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_short x, y, z, w; };
|
||||
|
@ -756,8 +745,7 @@ typedef union
|
|||
#endif
|
||||
} cl_short8;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_short CL_ALIGNED(32) s[16];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_short x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
|
||||
|
@ -780,8 +768,7 @@ typedef union
|
|||
|
||||
|
||||
/* ---- cl_ushortn ---- */
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_ushort CL_ALIGNED(4) s[2];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_ushort x, y; };
|
||||
|
@ -793,8 +780,7 @@ typedef union
|
|||
#endif
|
||||
} cl_ushort2;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_ushort CL_ALIGNED(8) s[4];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_ushort x, y, z, w; };
|
||||
|
@ -812,8 +798,7 @@ typedef union
|
|||
/* cl_ushort3 is identical in size, alignment and behavior to cl_ushort4. See section 6.1.5. */
|
||||
typedef cl_ushort4 cl_ushort3;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_ushort CL_ALIGNED(16) s[8];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_ushort x, y, z, w; };
|
||||
|
@ -831,8 +816,7 @@ typedef union
|
|||
#endif
|
||||
} cl_ushort8;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_ushort CL_ALIGNED(32) s[16];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_ushort x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
|
||||
|
@ -855,8 +839,7 @@ typedef union
|
|||
|
||||
|
||||
/* ---- cl_halfn ---- */
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_half CL_ALIGNED(4) s[2];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_half x, y; };
|
||||
|
@ -868,8 +851,7 @@ typedef union
|
|||
#endif
|
||||
} cl_half2;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_half CL_ALIGNED(8) s[4];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_half x, y, z, w; };
|
||||
|
@ -887,8 +869,7 @@ typedef union
|
|||
/* cl_half3 is identical in size, alignment and behavior to cl_half4. See section 6.1.5. */
|
||||
typedef cl_half4 cl_half3;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_half CL_ALIGNED(16) s[8];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_half x, y, z, w; };
|
||||
|
@ -906,8 +887,7 @@ typedef union
|
|||
#endif
|
||||
} cl_half8;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_half CL_ALIGNED(32) s[16];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_half x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
|
||||
|
@ -929,8 +909,7 @@ typedef union
|
|||
} cl_half16;
|
||||
|
||||
/* ---- cl_intn ---- */
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_int CL_ALIGNED(8) s[2];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_int x, y; };
|
||||
|
@ -942,8 +921,7 @@ typedef union
|
|||
#endif
|
||||
} cl_int2;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_int CL_ALIGNED(16) s[4];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_int x, y, z, w; };
|
||||
|
@ -961,8 +939,7 @@ typedef union
|
|||
/* cl_int3 is identical in size, alignment and behavior to cl_int4. See section 6.1.5. */
|
||||
typedef cl_int4 cl_int3;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_int CL_ALIGNED(32) s[8];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_int x, y, z, w; };
|
||||
|
@ -980,8 +957,7 @@ typedef union
|
|||
#endif
|
||||
} cl_int8;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_int CL_ALIGNED(64) s[16];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_int x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
|
||||
|
@ -1004,8 +980,7 @@ typedef union
|
|||
|
||||
|
||||
/* ---- cl_uintn ---- */
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_uint CL_ALIGNED(8) s[2];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_uint x, y; };
|
||||
|
@ -1017,8 +992,7 @@ typedef union
|
|||
#endif
|
||||
} cl_uint2;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_uint CL_ALIGNED(16) s[4];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_uint x, y, z, w; };
|
||||
|
@ -1036,8 +1010,7 @@ typedef union
|
|||
/* cl_uint3 is identical in size, alignment and behavior to cl_uint4. See section 6.1.5. */
|
||||
typedef cl_uint4 cl_uint3;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_uint CL_ALIGNED(32) s[8];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_uint x, y, z, w; };
|
||||
|
@ -1055,8 +1028,7 @@ typedef union
|
|||
#endif
|
||||
} cl_uint8;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_uint CL_ALIGNED(64) s[16];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_uint x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
|
||||
|
@ -1078,8 +1050,7 @@ typedef union
|
|||
} cl_uint16;
|
||||
|
||||
/* ---- cl_longn ---- */
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_long CL_ALIGNED(16) s[2];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_long x, y; };
|
||||
|
@ -1091,8 +1062,7 @@ typedef union
|
|||
#endif
|
||||
} cl_long2;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_long CL_ALIGNED(32) s[4];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_long x, y, z, w; };
|
||||
|
@ -1110,8 +1080,7 @@ typedef union
|
|||
/* cl_long3 is identical in size, alignment and behavior to cl_long4. See section 6.1.5. */
|
||||
typedef cl_long4 cl_long3;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_long CL_ALIGNED(64) s[8];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_long x, y, z, w; };
|
||||
|
@ -1129,8 +1098,7 @@ typedef union
|
|||
#endif
|
||||
} cl_long8;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_long CL_ALIGNED(128) s[16];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_long x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
|
||||
|
@ -1153,8 +1121,7 @@ typedef union
|
|||
|
||||
|
||||
/* ---- cl_ulongn ---- */
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_ulong CL_ALIGNED(16) s[2];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_ulong x, y; };
|
||||
|
@ -1166,8 +1133,7 @@ typedef union
|
|||
#endif
|
||||
} cl_ulong2;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_ulong CL_ALIGNED(32) s[4];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_ulong x, y, z, w; };
|
||||
|
@ -1185,8 +1151,7 @@ typedef union
|
|||
/* cl_ulong3 is identical in size, alignment and behavior to cl_ulong4. See section 6.1.5. */
|
||||
typedef cl_ulong4 cl_ulong3;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_ulong CL_ALIGNED(64) s[8];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_ulong x, y, z, w; };
|
||||
|
@ -1204,8 +1169,7 @@ typedef union
|
|||
#endif
|
||||
} cl_ulong8;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_ulong CL_ALIGNED(128) s[16];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_ulong x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
|
||||
|
@ -1229,8 +1193,7 @@ typedef union
|
|||
|
||||
/* --- cl_floatn ---- */
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_float CL_ALIGNED(8) s[2];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_float x, y; };
|
||||
|
@ -1242,8 +1205,7 @@ typedef union
|
|||
#endif
|
||||
} cl_float2;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_float CL_ALIGNED(16) s[4];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_float x, y, z, w; };
|
||||
|
@ -1261,8 +1223,7 @@ typedef union
|
|||
/* cl_float3 is identical in size, alignment and behavior to cl_float4. See section 6.1.5. */
|
||||
typedef cl_float4 cl_float3;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_float CL_ALIGNED(32) s[8];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_float x, y, z, w; };
|
||||
|
@ -1280,8 +1241,7 @@ typedef union
|
|||
#endif
|
||||
} cl_float8;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_float CL_ALIGNED(64) s[16];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_float x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
|
||||
|
@ -1304,8 +1264,7 @@ typedef union
|
|||
|
||||
/* --- cl_doublen ---- */
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_double CL_ALIGNED(16) s[2];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_double x, y; };
|
||||
|
@ -1317,8 +1276,7 @@ typedef union
|
|||
#endif
|
||||
} cl_double2;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_double CL_ALIGNED(32) s[4];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_double x, y, z, w; };
|
||||
|
@ -1336,8 +1294,7 @@ typedef union
|
|||
/* cl_double3 is identical in size, alignment and behavior to cl_double4. See section 6.1.5. */
|
||||
typedef cl_double4 cl_double3;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_double CL_ALIGNED(64) s[8];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_double x, y, z, w; };
|
||||
|
@ -1355,8 +1312,7 @@ typedef union
|
|||
#endif
|
||||
} cl_double8;
|
||||
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
cl_double CL_ALIGNED(128) s[16];
|
||||
#if __CL_HAS_ANON_STRUCT__
|
||||
__CL_ANON_STRUCT__ struct { cl_double x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
|
||||
|
|
|
@ -343,12 +343,14 @@ int main(int argc, char **argv) {
|
|||
case 0: // UID
|
||||
if (!strncmp(argv[optind], "0x", 2) || !strncmp(argv[optind], "0X", 2)) {
|
||||
if (strlen(argv[optind]) != 2 + 8) {
|
||||
printf("Error: invalid UID length\n"); usage(argv[0]);
|
||||
printf("Error: invalid UID length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
uid = (uint32_t) rev32(hexreversetoulong(argv[optind] + 2));
|
||||
} else {
|
||||
if (strlen(argv[optind]) != 8) {
|
||||
printf("Error: invalid UID length\n"); usage(argv[0]);
|
||||
printf("Error: invalid UID length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
uid = (uint32_t) rev32(hexreversetoulong(argv[optind]));
|
||||
}
|
||||
|
@ -357,12 +359,14 @@ int main(int argc, char **argv) {
|
|||
case 1: // nR1
|
||||
if (!strncmp(argv[optind], "0x", 2) || !strncmp(argv[optind], "0X", 2)) {
|
||||
if (strlen(argv[optind]) != 2 + 8) {
|
||||
printf("Error: invalid nR1 length\n"); usage(argv[0]);
|
||||
printf("Error: invalid nR1 length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
nR1 = (uint32_t) rev32(hexreversetoulong(argv[optind] + 2));
|
||||
} else {
|
||||
if (strlen(argv[optind]) != 8) {
|
||||
printf("Error: invalid nR1 length\n"); usage(argv[0]);
|
||||
printf("Error: invalid nR1 length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
nR1 = (uint32_t) rev32(hexreversetoulong(argv[optind]));
|
||||
}
|
||||
|
@ -370,7 +374,8 @@ int main(int argc, char **argv) {
|
|||
|
||||
case 2: // aR1
|
||||
if (strlen(argv[optind]) != 8) {
|
||||
printf("Error: invalid aR1 length\n"); usage(argv[0]);
|
||||
printf("Error: invalid aR1 length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
aR1 = (uint32_t) strtoul(argv[optind], NULL, 16);
|
||||
break;
|
||||
|
@ -378,12 +383,14 @@ int main(int argc, char **argv) {
|
|||
case 3: // nR2
|
||||
if (!strncmp(argv[optind], "0x", 2) || !strncmp(argv[optind], "0X", 2)) {
|
||||
if (strlen(argv[optind]) != 2 + 8) {
|
||||
printf("Error: invalid nR2 length\n"); usage(argv[0]);
|
||||
printf("Error: invalid nR2 length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
nR2 = (uint32_t) rev32(hexreversetoulong(argv[optind] + 2));
|
||||
} else {
|
||||
if (strlen(argv[optind]) != 8) {
|
||||
printf("Error: invalid nR2 length\n"); usage(argv[0]);
|
||||
printf("Error: invalid nR2 length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
nR2 = (uint32_t) rev32(hexreversetoulong(argv[optind]));
|
||||
}
|
||||
|
@ -391,7 +398,8 @@ int main(int argc, char **argv) {
|
|||
|
||||
case 4: // aR2
|
||||
if (strlen(argv[optind]) != 8) {
|
||||
printf("Error: invalid aR2 length\n"); usage(argv[0]);
|
||||
printf("Error: invalid aR2 length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
aR2 = (uint32_t) strtoul(argv[optind], NULL, 16);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue