added possibility for manual interruption of 4x50_watch
This commit is contained in:
@@ -210,6 +210,10 @@ static uint32_t get_pulse_length(void) {
|
|||||||
|
|
||||||
volatile uint8_t sample = (uint8_t)AT91C_BASE_SSC->SSC_RHR;
|
volatile uint8_t sample = (uint8_t)AT91C_BASE_SSC->SSC_RHR;
|
||||||
|
|
||||||
|
// for manual interruption
|
||||||
|
if (BUTTON_PRESS())
|
||||||
|
return 0;
|
||||||
|
|
||||||
while (sample > gLow && (timeout--))
|
while (sample > gLow && (timeout--))
|
||||||
sample = (uint8_t)AT91C_BASE_SSC->SSC_RHR;
|
sample = (uint8_t)AT91C_BASE_SSC->SSC_RHR;
|
||||||
|
|
||||||
@@ -1264,18 +1268,24 @@ void em4x50_watch() {
|
|||||||
memset(words, 0, sizeof(words));
|
memset(words, 0, sizeof(words));
|
||||||
now = 0;
|
now = 0;
|
||||||
|
|
||||||
if (get_signalproperties() && find_em4x50_tag()) {
|
//if (get_signalproperties()) && find_em4x50_tag()) {
|
||||||
|
if (get_signalproperties()) {
|
||||||
standard_read(&now, words);
|
Dbprintf("ghet 1");
|
||||||
|
if (find_em4x50_tag()) {
|
||||||
|
Dbprintf("ghet 2");
|
||||||
|
|
||||||
if (now > 0) {
|
standard_read(&now, words);
|
||||||
|
Dbprintf("ghet 3");
|
||||||
|
|
||||||
Dbprintf("");
|
if (now > 0) {
|
||||||
for (int i = 0; i < now; i++) {
|
|
||||||
|
Dbprintf("");
|
||||||
Dbprintf("EM4x50 TAG ID: "
|
for (int i = 0; i < now; i++) {
|
||||||
_GREEN_("%08x") " (msb) - " _GREEN_("%08x") " (lsb)",
|
|
||||||
words[i], reflect32(words[i]));
|
Dbprintf("EM4x50 TAG ID: "
|
||||||
|
_GREEN_("%08x") " (msb) - " _GREEN_("%08x") " (lsb)",
|
||||||
|
words[i], reflect32(words[i]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user