WXK
2025-01-22 255c51174a0571340ef470184064a5c75d261d27
01_SDK/nimble/controller/pan107x_spark/include/stack/controller/bb_api.h
@@ -43,6 +43,15 @@
   BB_POWER_7_dB    = 7,
}BB_Power_Type_t;
/*! Adv PDU Filter Mask */
enum{
    BB_ADV_PDU_FILT_ADV_IND                = (1 << 0),
   BB_ADV_PDU_FILT_ADV_NONCONN_IND        = (1 << 2),
   BB_ADV_PDU_FILT_SCAN_RSP               = (1 << 4),
   BB_ADV_PDU_FILT_ADV_SCAN_IND           = (1 << 6),
   BB_ADV_PDU_FILT_ADV_EXT_IND_OR_AUX_ADV = (1 << 7),
};
/**
 * @brief : Set RF TX power.
 * @param : pwr      can be BB_POWER_0_dB ...
@@ -56,9 +65,6 @@
 * @return: none.
 */
void BB_SetBleChannel(uint8_t bleChn);
/*! BB time */
static inline uint32_t BB_GetCurTick(void)
{
@@ -76,6 +82,42 @@
void BB_Calibrate32kRC(uint32_t expected_freq);
bool_t BB_Is32kClkTrackBusy(void);
/*! ADV Type/PDU Filter API */
// Only use for pan108
void BB_SetAdvTypeFilterEnable(uint8_t en);
/**
 * @brief : Set ADV Type to Filter.
 * @param : id               rang 0-6
 * @param : advType
 * @param : advTypeDataLen
 * @return: -1 if error or 0
 */
int BB_SetAdvTypeToFilter(uint8_t id, uint8_t advType, uint8_t advTypeDataLen);
// use for pan108/pan107
void BB_SetAdvPduFilterEnable(uint8_t en);
void BB_SetAdvPduFilter(uint8_t en, uint16_t advPduMsk);
// Only use for pan107
/**
 * @brief : Set ADV Packet data to Filter.
 * @param : id        rang 0-4
 * @param : offset    data start position in adv packet
 * @param : data      pointer point to data buffer.
 * @param : len       the length of data
 * @return: -1 if error or 0
 */
int BB_SetAdvPktDataToFilter(uint8_t id, uint8_t offset, uint8_t *data, uint32_t len);
/**
 * @brief : Enable ADV Packet Filter function.
 * @param : id        rang 0-4
 * @param : en        ENABLE/DISABLE
 * @return: -1 if error or 0
 */
int BB_SetAdvPktFilterEnable(uint8_t id, uint8_t en);
/*! BB Debug */
void BB_DebugInit(void);
void BB_DebugReset(void);