mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
style
This commit is contained in:
parent
b3731c6003
commit
b98d518fd7
8 changed files with 13 additions and 13 deletions
|
@ -113,7 +113,7 @@ static void RAMFUNC SniffAndStore(uint8_t param) {
|
||||||
SpinDelay(50);
|
SpinDelay(50);
|
||||||
|
|
||||||
// loop and listen
|
// loop and listen
|
||||||
while (!BUTTON_PRESS()) {
|
while (BUTTON_PRESS() == false) {
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
LED_A_ON();
|
LED_A_ON();
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,7 @@ void RunMod(void) {
|
||||||
// we just read 1024 bytes
|
// we just read 1024 bytes
|
||||||
read_success = LegicRfReaderEx(0, 1024, 0x55);
|
read_success = LegicRfReaderEx(0, 1024, 0x55);
|
||||||
|
|
||||||
} while (read_success == PM3_ESOFT && !BUTTON_PRESS());
|
} while ((read_success == PM3_ESOFT) && (BUTTON_PRESS() == false));
|
||||||
|
|
||||||
LEDsoff();
|
LEDsoff();
|
||||||
|
|
||||||
|
|
|
@ -830,7 +830,7 @@ void felica_dump_lite_s(void) {
|
||||||
uint16_t cnt = 0, cntfails = 0;
|
uint16_t cnt = 0, cntfails = 0;
|
||||||
uint8_t *dest = BigBuf_get_addr();
|
uint8_t *dest = BigBuf_get_addr();
|
||||||
|
|
||||||
while (!BUTTON_PRESS() && !data_available()) {
|
while ((BUTTON_PRESS() == false) && (data_available() == false)) {
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
// polling?
|
// polling?
|
||||||
//TransmitFor18092_AsReader(poll, 10, GetCountSspClk()+512, 1, 0);
|
//TransmitFor18092_AsReader(poll, 10, GetCountSspClk()+512, 1, 0);
|
||||||
|
|
|
@ -808,7 +808,7 @@ void SimulateHitagSTag(bool tag_mem_supplied, uint8_t *data, bool ledcontrol) {
|
||||||
// synchronized startup procedure
|
// synchronized startup procedure
|
||||||
while (AT91C_BASE_TC0->TC_CV > 0); // wait until TC0 returned to zero
|
while (AT91C_BASE_TC0->TC_CV > 0); // wait until TC0 returned to zero
|
||||||
|
|
||||||
while (!BUTTON_PRESS() && !data_available()) {
|
while ((BUTTON_PRESS() == false) && (data_available() == false)) {
|
||||||
|
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
|
|
||||||
|
@ -1279,7 +1279,7 @@ void ReadHitagS(hitag_function htf, hitag_data *htd, bool ledcontrol) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int pageNum = 0;
|
int pageNum = 0;
|
||||||
while (!BUTTON_PRESS() && !data_available()) {
|
while ((BUTTON_PRESS() == false) && (data_available() == false)) {
|
||||||
|
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
|
|
||||||
|
@ -1457,7 +1457,7 @@ void Hitag_check_challenges(uint8_t *data, uint32_t datalen, bool ledcontrol) {
|
||||||
uint8_t tx[HITAG_FRAME_LEN];
|
uint8_t tx[HITAG_FRAME_LEN];
|
||||||
int t_wait = HITAG_T_WAIT_MAX;
|
int t_wait = HITAG_T_WAIT_MAX;
|
||||||
|
|
||||||
while (BUTTON_PRESS() == false && data_available() == false) {
|
while ((BUTTON_PRESS() == false) && (data_available() == false)) {
|
||||||
// Watchdog hit
|
// Watchdog hit
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
|
|
||||||
|
|
|
@ -532,7 +532,7 @@ void Mifare1ksim(uint16_t flags, uint8_t exitAfterNReads, uint8_t *datain, uint1
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
bool finished = false;
|
bool finished = false;
|
||||||
bool button_pushed = BUTTON_PRESS();
|
bool button_pushed = BUTTON_PRESS();
|
||||||
while (!button_pushed && !finished) {
|
while ((button_pushed == false) && (finished == false)) {
|
||||||
|
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ void RAMFUNC SniffMifare(uint8_t param) {
|
||||||
|
|
||||||
uint32_t sniffCounter = 0;
|
uint32_t sniffCounter = 0;
|
||||||
// loop and listen
|
// loop and listen
|
||||||
while (!BUTTON_PRESS()) {
|
while (BUTTON_PRESS() == false) {
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
LED_A_ON();
|
LED_A_ON();
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -204,7 +204,7 @@ int BUTTON_CLICKED(int ms) {
|
||||||
int ticks = ((MCK / 1000) * (ms ? ms : 1000)) >> 10;
|
int ticks = ((MCK / 1000) * (ms ? ms : 1000)) >> 10;
|
||||||
|
|
||||||
// If we're not even pressed, forget about it!
|
// If we're not even pressed, forget about it!
|
||||||
if (!BUTTON_PRESS())
|
if (BUTTON_PRESS() == false)
|
||||||
return BUTTON_NO_CLICK;
|
return BUTTON_NO_CLICK;
|
||||||
|
|
||||||
// Borrow a PWM unit for my real-time clock
|
// Borrow a PWM unit for my real-time clock
|
||||||
|
@ -223,7 +223,7 @@ int BUTTON_CLICKED(int ms) {
|
||||||
// We haven't let off the button yet
|
// We haven't let off the button yet
|
||||||
if (!letoff) {
|
if (!letoff) {
|
||||||
// We just let it off!
|
// We just let it off!
|
||||||
if (!BUTTON_PRESS()) {
|
if (BUTTON_PRESS() == false) {
|
||||||
letoff = 1;
|
letoff = 1;
|
||||||
|
|
||||||
// reset our timer for 500ms
|
// reset our timer for 500ms
|
||||||
|
@ -268,7 +268,7 @@ int BUTTON_HELD(int ms) {
|
||||||
int ticks = (48000 * (ms ? ms : 1000)) >> 10;
|
int ticks = (48000 * (ms ? ms : 1000)) >> 10;
|
||||||
|
|
||||||
// If we're not even pressed, forget about it!
|
// If we're not even pressed, forget about it!
|
||||||
if (!BUTTON_PRESS())
|
if (BUTTON_PRESS() == false)
|
||||||
return BUTTON_NO_CLICK;
|
return BUTTON_NO_CLICK;
|
||||||
|
|
||||||
// Borrow a PWM unit for my real-time clock
|
// Borrow a PWM unit for my real-time clock
|
||||||
|
@ -284,7 +284,7 @@ int BUTTON_HELD(int ms) {
|
||||||
uint16_t now = AT91C_BASE_PWMC_CH0->PWMC_CCNTR;
|
uint16_t now = AT91C_BASE_PWMC_CH0->PWMC_CCNTR;
|
||||||
|
|
||||||
// As soon as our button let go, we didn't hold long enough
|
// As soon as our button let go, we didn't hold long enough
|
||||||
if (!BUTTON_PRESS())
|
if (BUTTON_PRESS() == false)
|
||||||
return BUTTON_SINGLE_CLICK;
|
return BUTTON_SINGLE_CLICK;
|
||||||
|
|
||||||
// Have we waited the full second?
|
// Have we waited the full second?
|
||||||
|
|
|
@ -232,7 +232,7 @@ static void flash_mode(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_common_area.flags.button_pressed && !BUTTON_PRESS()) {
|
if (g_common_area.flags.button_pressed && BUTTON_PRESS() == false) {
|
||||||
g_common_area.flags.button_pressed = 0;
|
g_common_area.flags.button_pressed = 0;
|
||||||
}
|
}
|
||||||
if (!g_common_area.flags.button_pressed && BUTTON_PRESS()) {
|
if (!g_common_area.flags.button_pressed && BUTTON_PRESS()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue