modules/woz_uwb/src/ccc/ccc_shim_wrap.c
openaliro/openaliro
Module
ccc_shim_wrap.c
per-frame STS interception: woz_uwb_set_sts_iv() substitutes the CCC STS…
Overview
per-frame STS interception: woz_uwb_set_sts_iv() substitutes the CCC STS for the FiRa MAC; target only.
depends on woz_log.h ccc_shim.h uwb_seam.h woz_bytes.h
API
Fvoid ccc_shim_wrap_log_reset(void)
modules/woz_uwb/src/ccc/ccc_shim_wrap.c:41
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:47
Pack a 16-byte dURSK into the DW3000 STS-key register image.
called by
woz_uwb_set_sts_ivFstatic 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:66
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
woz_uwb_set_sts_ivFvoid woz_uwb_set_sts_iv(dwt_sts_cp_iv_t *pStsIv)
modules/woz_uwb/src/ccc/ccc_shim_wrap.c:84
Intercept DW3000 STS IV configuration, deriving dURSK and STS-V from CCC secrets and configuring the radio; falls through to the plain decadriver load if the shim is inactive.
pStsIv- DW3000 STS-IV register structure (also holds the MAC's own frame index).
calls
pack_iv, pack_key