— per-frame STS interception: woz_uwb_set_sts_iv() substitutes the CCC STS for the FiRa MAC; target only.
More...
#include <stddef.h>
#include <stdint.h>
#include "woz_log.h"
#include "woz_bytes.h"
#include <deca_device_api.h>
#include "ccc_shim.h"
#include "uwb_seam.h"
|
|
#define | CCC_SHIM_LOG_FRAMES 8 |
| | Log the first N intercepted STS IVs — confirms the blob index layout.
|
| |
|
| void | ccc_shim_wrap_log_reset (void) |
| | Reset the frame logging counter to zero, used for re-enabling diagnostics after the first N frames.
|
| |
|
static void | pack_key (dwt_sts_cp_key_t *out, const uint8_t dursk[CCC_DURSK_LEN]) |
| | Pack a 16-byte dURSK into the DW3000 STS-key register image.
|
| |
| static void | pack_iv (dwt_sts_cp_iv_t *out, const uint8_t sts_v[CCC_STS_V_LEN]) |
| | Pack a 16-byte STS-V into the DW3000 STS-IV register image (whole-16 reverse then per-word LE).
|
| |
| void | woz_uwb_set_sts_iv (dwt_sts_cp_iv_t *pStsIv) |
| | 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.
|
| |
|
|
static uint32_t | g_log_frames |
| | Count of intercepted IVs; the first CCC_SHIM_LOG_FRAMES are logged.
|
| |
— per-frame STS interception: woz_uwb_set_sts_iv() substitutes the CCC STS for the FiRa MAC; target only.
◆ ccc_shim_wrap_log_reset()
| void ccc_shim_wrap_log_reset |
( |
void |
| ) |
|
Reset the frame logging counter to zero, used for re-enabling diagnostics after the first N frames.
Reset the wrap's first-N-frame IV log budget (target only).
◆ pack_iv()
| static void pack_iv |
( |
dwt_sts_cp_iv_t * |
out, |
|
|
const uint8_t |
sts_v[CCC_STS_V_LEN] |
|
) |
| |
|
static |
Pack a 16-byte STS-V into the DW3000 STS-IV register image (whole-16 reverse then per-word LE).
- Parameters
-
| out | DW3000 STS-IV register structure (iv0, iv1, iv2, iv3). |
| sts_v | 16-byte STS-V value. |
◆ woz_uwb_set_sts_iv()
| void woz_uwb_set_sts_iv |
( |
dwt_sts_cp_iv_t * |
pStsIv | ) |
|
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.
- Parameters
-
| pStsIv | DW3000 STS-IV register structure (also holds the MAC's own frame index). |