modules/woz_uwb/src/ccc/ccc_shim_wrap.c
asxeem/openaliro
Module

ccc_shim_wrap.c

per-frame STS interception (ld --wrap=dwt_configurestsiv) substituting…

modules/woz_uwb/src/ccc/ccc_shim_wrap.c4 documented symbols

Overview

per-frame STS interception (ld --wrap=dwt_configurestsiv) substituting CCC STS for the FiRa MAC; target only.

depends on woz_log.h ccc_shim.h woz_bytes.h

API

Fvoid ccc_shim_wrap_log_reset(void)

modules/woz_uwb/src/ccc/ccc_shim_wrap.c:43

Reset the frame logging counter to zero, used for re-enabling diagnostics after the first N frames.

Fstatic void pack_key(dwt_sts_cp_key_t *out, const uint8_t dursk[CCC_DURSK_LEN])

modules/woz_uwb/src/ccc/ccc_shim_wrap.c:49

Pack a 16-byte dURSK into the DW3000 STS-key register image.

called by __wrap_dwt_configurestsiv

Fstatic void pack_iv(dwt_sts_cp_iv_t *out, const uint8_t sts_v[CCC_STS_V_LEN])

modules/woz_uwb/src/ccc/ccc_shim_wrap.c:68

Pack a 16-byte STS-V into the DW3000 STS-IV register image (whole-16 reverse then per-word LE).

out
DW3000 STS-IV register structure (iv0, iv1, iv2, iv3).
sts_v
16-byte STS-V value.
called by __wrap_dwt_configurestsiv

Fvoid __wrap_dwt_configurestsiv(dwt_sts_cp_iv_t *pStsIv)

modules/woz_uwb/src/ccc/ccc_shim_wrap.c:86

Intercept DW3000 STS IV configuration, deriving dURSK and STS-V from CCC secrets and configuring the radio; falls through to real dwt_configurestsiv if shim is inactive.

pStsIv
DW3000 STS-IV register structure (also holds the FiRa blob index).
calls pack_iv, pack_key