Bluetooth: controller: Move PKT_US from LLL to ULL header file

Move PKT_US definition from LLL header file to ULL header so
as to share it across vendors.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2019-02-04 22:26:01 +05:30 committed by Carles Cufí
commit 5bacbf612d
2 changed files with 11 additions and 12 deletions

View file

@ -6,18 +6,6 @@
#define TIFS_US 150 #define TIFS_US 150
/* Macro to return PDU time */
#if defined(CONFIG_BT_CTLR_PHY_CODED)
#define PKT_US(octets, phy) \
(((phy) & BIT(2)) ? \
(80 + 256 + 16 + 24 + ((((2 + (octets) + 4) * 8) + 24 + 3) * 8)) : \
(((octets) + 14) * 8 / BIT(((phy) & 0x03) >> 1)))
#else /* !CONFIG_BT_CTLR_PHY_CODED */
#define PKT_US(octets, phy) \
(((octets) + 14) * 8 / BIT(((phy) & 0x03) >> 1))
#endif /* !CONFIG_BT_CTLR_PHY_CODED */
static inline u32_t addr_us_get(u8_t phy) static inline u32_t addr_us_get(u8_t phy)
{ {
switch (phy) { switch (phy) {

View file

@ -41,6 +41,17 @@
#include <soc.h> #include <soc.h>
#include "hal/debug.h" #include "hal/debug.h"
/* Macro to return PDU time */
#if defined(CONFIG_BT_CTLR_PHY_CODED)
#define PKT_US(octets, phy) \
(((phy) & BIT(2)) ? \
(80 + 256 + 16 + 24 + ((((2 + (octets) + 4) * 8) + 24 + 3) * 8)) : \
(((octets) + 14) * 8 / BIT(((phy) & 0x03) >> 1)))
#else /* !CONFIG_BT_CTLR_PHY_CODED */
#define PKT_US(octets, phy) \
(((octets) + 14) * 8 / BIT(((phy) & 0x03) >> 1))
#endif /* !CONFIG_BT_CTLR_PHY_CODED */
static int init_reset(void); static int init_reset(void);
static void ticker_op_update_cb(u32_t status, void *param); static void ticker_op_update_cb(u32_t status, void *param);
static inline void disable(u16_t handle); static inline void disable(u16_t handle);