mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
structs: initializes explicitely all fields, so we can detect when we really forgot one [-Wmissing-field-initializers]
This commit is contained in:
parent
af3397bd19
commit
0ab6de64d4
43 changed files with 211 additions and 211 deletions
|
@ -144,7 +144,7 @@ static int usage_lf_find(void) {
|
|||
/* send a LF command before reading */
|
||||
int CmdLFCommandRead(const char *Cmd) {
|
||||
|
||||
UsbCommand c = {CMD_MOD_THEN_ACQUIRE_RAW_ADC_SAMPLES_125K, {0, 0, 0}};
|
||||
UsbCommand c = {CMD_MOD_THEN_ACQUIRE_RAW_ADC_SAMPLES_125K, {0, 0, 0}, {{0}}};
|
||||
bool errors = false;
|
||||
|
||||
uint8_t cmdp = 0;
|
||||
|
@ -334,7 +334,7 @@ int CmdLFSetConfig(const char *Cmd) {
|
|||
|
||||
bool lf_read(bool silent, uint32_t samples) {
|
||||
if (IsOffline()) return false;
|
||||
UsbCommand c = {CMD_ACQUIRE_RAW_ADC_SAMPLES_125K, {silent, samples, 0}};
|
||||
UsbCommand c = {CMD_ACQUIRE_RAW_ADC_SAMPLES_125K, {silent, samples, 0}, {{0}}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
|
||||
|
@ -390,7 +390,7 @@ int CmdLFSniff(const char *Cmd) {
|
|||
uint8_t cmdp = tolower(param_getchar(Cmd, 0));
|
||||
if (cmdp == 'h') return usage_lf_sniff();
|
||||
|
||||
UsbCommand c = {CMD_LF_SNIFF_RAW_ADC_SAMPLES, {0, 0, 0}};
|
||||
UsbCommand c = {CMD_LF_SNIFF_RAW_ADC_SAMPLES, {0, 0, 0}, {{0}}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
WaitForResponse(CMD_ACK, NULL);
|
||||
|
@ -423,7 +423,7 @@ int CmdLFSim(const char *Cmd) {
|
|||
|
||||
//can send only 512 bits at a time (1 byte sent per bit...)
|
||||
for (uint16_t i = 0; i < GraphTraceLen; i += USB_CMD_DATA_SIZE) {
|
||||
UsbCommand c = {CMD_UPLOAD_SIM_SAMPLES_125K, {i, FPGA_LF, 0}};
|
||||
UsbCommand c = {CMD_UPLOAD_SIM_SAMPLES_125K, {i, FPGA_LF, 0}, {{0}}};
|
||||
|
||||
for (uint16_t j = 0; j < USB_CMD_DATA_SIZE; j++)
|
||||
c.d.asBytes[j] = GraphBuffer[i + j];
|
||||
|
@ -437,7 +437,7 @@ int CmdLFSim(const char *Cmd) {
|
|||
|
||||
PrintAndLogEx(NORMAL, "Simulating");
|
||||
|
||||
UsbCommand c = {CMD_SIMULATE_TAG_125K, {GraphTraceLen, gap, 0}};
|
||||
UsbCommand c = {CMD_SIMULATE_TAG_125K, {GraphTraceLen, gap, 0}, {{0}}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
return 0;
|
||||
|
@ -526,7 +526,7 @@ int CmdLFfskSim(const char *Cmd) {
|
|||
PrintAndLogEx(NORMAL, "DemodBuffer too long for current implementation - length: %d - max: %d", size, USB_CMD_DATA_SIZE);
|
||||
size = USB_CMD_DATA_SIZE;
|
||||
}
|
||||
UsbCommand c = {CMD_FSK_SIM_TAG, {arg1, arg2, size}};
|
||||
UsbCommand c = {CMD_FSK_SIM_TAG, {arg1, arg2, size}, {{0}}};
|
||||
|
||||
memcpy(c.d.asBytes, DemodBuffer, size);
|
||||
clearCommandBuffer();
|
||||
|
@ -622,7 +622,7 @@ int CmdLFaskSim(const char *Cmd) {
|
|||
arg1 = clk << 8 | encoding;
|
||||
arg2 = invert << 8 | separator;
|
||||
|
||||
UsbCommand c = {CMD_ASK_SIM_TAG, {arg1, arg2, size}};
|
||||
UsbCommand c = {CMD_ASK_SIM_TAG, {arg1, arg2, size}, {{0}}};
|
||||
memcpy(c.d.asBytes, DemodBuffer, size);
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
|
@ -729,7 +729,7 @@ int CmdLFpskSim(const char *Cmd) {
|
|||
PrintAndLogEx(NORMAL, "DemodBuffer too long for current implementation - length: %d - max: %d", size, USB_CMD_DATA_SIZE);
|
||||
size = USB_CMD_DATA_SIZE;
|
||||
}
|
||||
UsbCommand c = {CMD_PSK_SIM_TAG, {arg1, arg2, size}};
|
||||
UsbCommand c = {CMD_PSK_SIM_TAG, {arg1, arg2, size}, {{0}}};
|
||||
PrintAndLogEx(DEBUG, "DEBUG: Sending DemodBuffer Length: %d", size);
|
||||
memcpy(c.d.asBytes, DemodBuffer, size);
|
||||
clearCommandBuffer();
|
||||
|
@ -742,7 +742,7 @@ int CmdLFSimBidir(const char *Cmd) {
|
|||
// Set ADC to twice the carrier for a slight supersampling
|
||||
// HACK: not implemented in ARMSRC.
|
||||
PrintAndLogEx(INFO, "Not implemented yet.");
|
||||
UsbCommand c = {CMD_LF_SIMULATE_BIDIR, {47, 384, 0}};
|
||||
UsbCommand c = {CMD_LF_SIMULATE_BIDIR, {47, 384, 0}, {{0}}};
|
||||
SendCommand(&c);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue