#ifndef cp_beacon_ntb_ntb_h #define cp_beacon_ntb_ntb_h /* Cesar project {{{ * * Copyright (C) 2008 Spidcom * * <<>> * * }}} */ /** * \file cp/beacon/ntb/ntb.h * \brief NTB clock synchronization. * \ingroup cp_beacon */ #include "cp/cp.h" /** Forward declaration. */ typedef struct cp_beacon_ntb_t cp_beacon_ntb_t; BEGIN_DECLS /** * Initialise the NTB module. * \param ctx the CP context. */ void cp_beacon_ntb_init (cp_t *ctx); /** * Uninitialise the NTB module. * \param ctx the CP context. */ void cp_beacon_ntb_uninit (cp_t *ctx); /* * Synchronize local clock to be as close as possible to estimated value * of the NTB clock reference. * * \param ctx pointer to CP context * \param beacon_bts beacon time stamp * \param beacon_sta_ltmr STA local time captured when receiving beacon */ void cp_beacon_ntb_clk_sync (cp_t * ctx, u32 beacon_bts, u32 beacon_sys_ltmr, u32 beacon_sta_ltmr); /** * Clear the values to synchronize another CCo. * \param ctx module context. */ void cp_beacon_ntb_clear (cp_t *ctx); END_DECLS #endif /* cp_beacon_ntb_ntb_h */