CHG: removed old TRUE/FALSE defines... some left still..

This commit is contained in:
iceman1001
2017-07-27 09:28:43 +02:00
parent 86bbd8f563
commit 46a0ec7130
21 changed files with 66 additions and 67 deletions

View File

@@ -1499,9 +1499,10 @@ void __attribute__((noreturn)) AppMain(void)
for(;;) {
if ( usb_poll_validate_length() ) {
rx_len = usb_read(rx, sizeof(UsbCommand));
if (rx_len)
Dbprintf("ice recive len: %u", rx_len);
if (rx_len) {
UsbPacketReceived(rx, rx_len);
}
}
WDT_HIT();

View File

@@ -218,7 +218,7 @@ void frame_sendAsReader(uint32_t data, uint8_t bits){
// log
uint8_t cmdbytes[] = {bits, BYTEx(data,0), BYTEx(data,1), BYTEx(data,2), BYTEx(send,0), BYTEx(send,1), BYTEx(send,2)};
LogTrace(cmdbytes, sizeof(cmdbytes), starttime, GET_TICKS, NULL, TRUE);
LogTrace(cmdbytes, sizeof(cmdbytes), starttime, GET_TICKS, NULL, true);
}
/* Receive a frame from the card in reader emulation mode, the FPGA and
@@ -291,7 +291,7 @@ static void frame_receiveAsReader(struct legic_frame * const f, uint8_t bits) {
// log
uint8_t cmdbytes[] = {bits, BYTEx(data, 0), BYTEx(data, 1)};
LogTrace(cmdbytes, sizeof(cmdbytes), starttime, GET_TICKS, NULL, FALSE);
LogTrace(cmdbytes, sizeof(cmdbytes), starttime, GET_TICKS, NULL, false);
}
// Setup pm3 as a Legic Reader
@@ -460,7 +460,7 @@ OUT: ;
legic_prng_forward(1);
uint8_t cmdbytes[] = {1, isOK, BYTEx(steps, 0), BYTEx(steps, 1) };
LogTrace(cmdbytes, sizeof(cmdbytes), start, GET_TICKS, NULL, FALSE);
LogTrace(cmdbytes, sizeof(cmdbytes), start, GET_TICKS, NULL, false);
return isOK;
}
@@ -833,7 +833,7 @@ void LegicRfSimulate(int phase, int frame, int reqresp)
cardmem = BigBuf_get_EM_addr();
clear_trace();
set_tracing(TRUE);
set_tracing(true);
crc_init(&legic_crc, 4, 0x19 >> 1, 0x5, 0);
@@ -1163,7 +1163,7 @@ static struct {
// break;
// }
// return FALSE;
// return false;
// }
/*
@@ -1362,7 +1362,7 @@ static RAMFUNC int HandleLegicSamplesDemod(int ci, int cq)
if(s == 0x000) {
// This is EOF (start, stop and all data bits == '0'
return TRUE;
return true;
}
}
}
@@ -1375,7 +1375,7 @@ static RAMFUNC int HandleLegicSamplesDemod(int ci, int cq)
LED_C_OFF();
break;
}
return FALSE;
return false;
}
*/
/*
@@ -1409,7 +1409,7 @@ static void DemodInit(uint8_t *data) {
static void GetSamplesForLegicDemod(int n, bool quiet)
{
int max = 0;
bool gotFrame = FALSE;
bool gotFrame = false;
int lastRxCounter = LEGIC_DMA_BUFFER_SIZE;
int ci, cq, samples = 0;
@@ -1478,7 +1478,7 @@ static void DemodInit(uint8_t *data) {
//Tracing
if (Demod.len > 0) {
uint8_t parity[MAX_PARITY_SIZE] = {0x00};
LogTrace(Demod.output, Demod.len, 0, 0, parity, FALSE);
LogTrace(Demod.output, Demod.len, 0, 0, parity, false);
}
}
@@ -1583,7 +1583,7 @@ static void CodeLegicBitsAsReader(const uint8_t *cmd, uint8_t cmdlen, int bits)
TransmitForLegic();
if (tracing) {
uint8_t parity[1] = {0x00};
LogTrace(cmd, cmdlen, 0, 0, parity, TRUE);
LogTrace(cmd, cmdlen, 0, 0, parity, true);
}
}
@@ -1596,7 +1596,7 @@ void ice_legic_setup() {
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
BigBuf_free(); BigBuf_Clear_ext(false);
clear_trace();
set_tracing(TRUE);
set_tracing(true);
DemodReset();
UartReset();

View File

@@ -1817,7 +1817,7 @@ void Cotag(uint32_t arg0) {
switch(rawsignal) {
case 0: doCotagAcquisition(50000); break;
case 1: doCotagAcquisitionManchester(); break;
case 2: DoAcquisition_config(TRUE); break;
case 2: DoAcquisition_config(true); break;
}
// Turn the field off

View File

@@ -14,7 +14,7 @@
//-----------------------------------------------------------------------------
#include "mifarecmd.h"
#include <inttypes.h>
//-----------------------------------------------------------------------------
// Select, Authenticate, Read a MIFARE tag.
// read block
@@ -957,8 +957,7 @@ void MifareChkKeys(uint16_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain) {
uint8_t keyType = (arg0 >> 8) & 0xFF;
bool clearTrace = arg1 & 0xFF;
uint8_t keyCount = arg2;
uint64_t ui64Key = 0;
uint64_t key = 0;
bool have_uid = false;
uint8_t cascade_levels = 0;
uint32_t timeout = 0;
@@ -1012,9 +1011,8 @@ void MifareChkKeys(uint16_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain) {
}
}
ui64Key = bytes_to_num(datain + i * 6, 6);
if (mifare_classic_auth(pcs, cuid, blockNo, keyType, ui64Key, AUTH_FIRST)) {
key = bytes_to_num(datain + i * 6, 6);
if (mifare_classic_auth(pcs, cuid, blockNo, keyType, key, AUTH_FIRST)) {
uint8_t dummy_answer = 0;
ReaderTransmit(&dummy_answer, 1, NULL);