#ifndef PRESSURE_DECODE_H
#define PRESSURE_DECODE_H
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
/* Only XGZP6897D C-address variant, manufacturer V3.3/20260827. */
typedef struct { uint8_t address; uint16_t protocol_revision; int32_t pmin_pa, pmax_pa; } xp_profile;
typedef struct { int32_t raw_signed; int64_t pressure_millipa; bool decoded, suction_valid; } xp_result;
typedef enum { XP_OK, XP_ARGUMENT, XP_PROFILE, XP_TRANSPORT, XP_RANGE } xp_status;
/* Exactly 5 bytes from registers 0x04..0x08. Does not establish freshness,
   sensor identity, temperature validity, calibration, or fan permission. */
xp_status xp_decode(const xp_profile *, const uint8_t *, size_t, bool transport_ok, xp_result *);
#endif
