Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
a895cb869This file is pinned to the selected release. Download the original to open it in your design tool.
#ifndef BOOT_INPUT_H
#define BOOT_INPUT_H
#include "st25_io.h"
#include <stdbool.h>
// Boot input: unified result from all boot-time input sources
// (pushbuttons, NFC, RTC alarm). The source field uses the INPUT_BUTTON()
// and INPUT_NFC() namespaces defined in use_case.h.
typedef struct {
int source; // INPUT_BUTTON(n) or INPUT_NFC(op)
bool reject; // spurious NFC wake — caller should shut down
bool st25_present; // ST25 chip detected (for cleanup at shutdown)
} boot_input_t;
// Read all boot-time input sources and return unified result.
// Call after I2C bus is initialized.
boot_input_t read_boot_input(void);
// Module state — read by telemetry (http_client.c) and NFC renderers
extern const char *wake_source;
extern char nfc_text_buf[];
extern uint8_t nfc_image_buf[];
extern char nfc_booking_email[]; // populated on ST25_OPCODE_BOOK_SEAT (0x40)
#endif // BOOT_INPUT_H