Performs the ED scan functionalities.
Macros | |
#define | CALCULATE_SYMBOL_TIME_SCAN_DURATION(SD) (aBaseSuperframeDuration * ((1UL << (SD)) + 1)) |
#define | CLIP_VALUE_REG (62) |
Functions | |
void | ed_scan_done (void) |
Scan done. More... | |
retval_t | tal_ed_start (uint8_t scan_duration) |
Starts ED Scan. More... | |
static void | trx_ed_irq_handler_cb (void) |
ED Scan Interrupt. More... | |
Variables | |
static uint8_t | max_ed_level |
The peak_ed_level is the maximum ED value received from the transceiver for the specified Scan Duration. More... | |
static uint32_t | sampler_counter |
#define CALCULATE_SYMBOL_TIME_SCAN_DURATION | ( | SD | ) | (aBaseSuperframeDuration * ((1UL << (SD)) + 1)) |
Referenced by tal_ed_start().
#define CLIP_VALUE_REG (62) |
Referenced by ed_scan_done().
void ed_scan_done | ( | void | ) |
Scan done.
This function updates the max_ed_level and invokes the callback function tal_ed_end_cb().
parameter | unused callback parameter |
References CLIP_VALUE_REG, CMD_RX_AACK_ON, FUNC_PTR, max_ed_level, pal_trx_irq_en, RG_IRQ_MASK, RX_ENABLE, set_trx_state(), SR_RX_PDT_DIS, tal_ed_end_cb(), TAL_IDLE, tal_state, trx_bit_write(), TRX_IRQ_DEFAULT, trx_irq_handler_cb(), trx_irq_init(), and trx_reg_write().
Referenced by tal_task().
retval_t tal_ed_start | ( | uint8_t | scan_duration | ) |
Starts ED Scan.
This function starts an ED Scan for the scan duration specified by the MAC layer.
scan_duration | Specifies the ED scan duration in symbols |
References Assert, CALCULATE_SYMBOL_TIME_SCAN_DURATION, CMD_FORCE_PLL_ON, CMD_RX_ON, ED_SAMPLE_DURATION_SYM, FAILURE, FUNC_PTR, MAC_SUCCESS, max_ed_level, pal_trx_irq_dis, pal_trx_irq_en, RG_IRQ_MASK, RG_IRQ_STATUS, RG_PHY_ED_LEVEL, RX_DISABLE, RX_ENABLE, RX_ON, sampler_counter, set_trx_state(), SR_IRQ_MASK, SR_RX_PDT_DIS, TAL_BUSY, TAL_ED_RUNNING, TAL_IDLE, tal_state, TAL_TRX_ASLEEP, tal_trx_status, trx_bit_write(), trx_ed_irq_handler_cb(), TRX_IRQ_4_CCA_ED_DONE, TRX_IRQ_DEFAULT, trx_irq_handler_cb(), trx_irq_init(), trx_reg_read(), trx_reg_write(), and TRX_SLEEP.
Referenced by scan_set_complete().
|
static |
ED Scan Interrupt.
This function handles an ED done interrupt from the transceiver.
References Assert, max_ed_level, RG_IRQ_STATUS, RG_PHY_ED_LEVEL, sampler_counter, TAL_ED_DONE, tal_state, TRX_IRQ_0_PLL_LOCK, TRX_IRQ_4_CCA_ED_DONE, trx_reg_read(), and trx_reg_write().
Referenced by tal_ed_start().
|
static |
The peak_ed_level is the maximum ED value received from the transceiver for the specified Scan Duration.
Referenced by ed_scan_done(), tal_ed_start(), and trx_ed_irq_handler_cb().
|
static |
Referenced by tal_ed_start(), and trx_ed_irq_handler_cb().