Fix PN532 transport and NFC tag handling.

Tighten PN532 framing and NFC access locking so scan, read, write, and raw operations behave reliably on hardware, and correct Classic versus Type 2 tag classification so common cards hit the right code paths. Refresh the embedded web assets and launcher files to match the corrected firmware behavior.

Made-with: Cursor
This commit is contained in:
drjones
2026-04-02 18:32:06 -07:00
parent 8968560565
commit 3be2d3f936
19 changed files with 1162 additions and 287 deletions

View File

@@ -35,12 +35,40 @@ void session_capture_clear(void)
bool session_capture_is_full(void)
{
return s_full;
bool full = false;
if (s_mu) {
xSemaphoreTake(s_mu, portMAX_DELAY);
}
full = s_full;
if (s_mu) {
xSemaphoreGive(s_mu);
}
return full;
}
bool session_capture_deep_enabled(void) { return s_deep; }
bool session_capture_deep_enabled(void)
{
bool deep = false;
if (s_mu) {
xSemaphoreTake(s_mu, portMAX_DELAY);
}
deep = s_deep;
if (s_mu) {
xSemaphoreGive(s_mu);
}
return deep;
}
void session_capture_set_deep(bool on) { s_deep = on; }
void session_capture_set_deep(bool on)
{
if (s_mu) {
xSemaphoreTake(s_mu, portMAX_DELAY);
}
s_deep = on;
if (s_mu) {
xSemaphoreGive(s_mu);
}
}
size_t session_capture_max(void) { return sizeof(s_buf) - 2; }
@@ -65,7 +93,7 @@ void session_capture_get_status(size_t *used_bytes, uint32_t *line_count, bool *
bool session_capture_append_line(const char *line)
{
if (!line || s_full) {
if (!line) {
return false;
}
size_t l = strlen(line);
@@ -106,8 +134,6 @@ size_t session_capture_export_size(void)
return n;
}
const char *session_capture_export_ptr(void) { return s_buf; }
void session_capture_copy_to(char *dst, size_t cap, size_t *out_len)
{
if (s_mu) {