ext/hal/nordic/drivers/nrf_drv_radio802154.c
// Initialize radio peripheral and interrupts.
Initialize radio peripheral and interrupts.
Initialize radio peripheral and interrupts .
static void nrf_radio_init(void)
{
    nrf_radio_mode_set(NRF_RADIO_MODE_IEEE802154_250KBIT);
    nrf_radio_config_length_field_length_set(8);
    nrf_radio_config_preamble_length_set(NRF_RADIO_PREAMBLE_LENGTH_32BIT_ZERO);
    nrf_radio_config_crc_included_set(true);
    nrf_radio_config_max_length_set(MAX_PACKET_SIZE);
    nrf_radio_crc_length_set(CRC_LENGTH);
    nrf_radio_crc_includes_address_set(NRF_RADIO_CRC_INCLUDES_ADDR_IEEE802154);
    nrf_radio_crc_polynominal_set(CRC_POLYNOMIAL);
    nrf_radio_cca_mode_set(RADIO_CCA_MODE);
    nrf_radio_cca_ed_threshold_set(RADIO_CCA_ED_THRESHOLD);
    nrf_radio_cca_corr_threshold_set(RADIO_CCA_CORR_THRESHOLD);
    nrf_radio_cca_corr_counter_set(RADIO_CCA_CORR_LIMIT);
    nrf_radio_mhmu_search_pattern_set(0);
    nrf_radio_mhmu_pattern_mask_set(MHMU_MASK);
    nrf_radio_int_enable(NRF_RADIO_INT_FRAMESTART_MASK);
    nrf_radio_int_enable(NRF_RADIO_INT_END_MASK);
    nrf_radio_int_enable(NRF_RADIO_INT_DISABLED_MASK);
#if !SHORT_CCAIDLE_TXEN
    nrf_radio_int_enable(NRF_RADIO_INT_CCAIDLE_MASK);
#endif
    nrf_radio_int_enable(NRF_RADIO_INT_CCABUSY_MASK);
    nrf_radio_int_enable(NRF_RADIO_INT_READY_MASK);
    nrf_radio_int_enable(NRF_RADIO_INT_BCMATCH_MASK);
    nrf_radio_int_enable(NRF_RADIO_INT_EDEND_MASK);
#if SHORT_CCAIDLE_TXEN
    nrf_radio_shorts_enable(NRF_RADIO_SHORT_CCAIDLE_TXEN_MASK);
#endif
}
static void nrf_radio_init ( void ) { nrf_radio_mode_set ( NRF_RADIO_MODE_IEEE802154_250KBIT ) ; nrf_radio_config_length_field_length_set ( 8 ) ; nrf_radio_config_preamble_length_set ( NRF_RADIO_PREAMBLE_LENGTH_32BIT_ZERO ) ; nrf_radio_config_crc_included_set ( true ) ; nrf_radio_config_max_length_set ( MAX_PACKET_SIZE ) ; nrf_radio_crc_length_set ( CRC_LENGTH ) ; nrf_radio_crc_includes_address_set ( NRF_RADIO_CRC_INCLUDES_ADDR_IEEE802154 ) ; nrf_radio_crc_polynominal_set ( CRC_POLYNOMIAL ) ; nrf_radio_cca_mode_set ( RADIO_CCA_MODE ) ; nrf_radio_cca_ed_threshold_set ( RADIO_CCA_ED_THRESHOLD ) ; nrf_radio_cca_corr_threshold_set ( RADIO_CCA_CORR_THRESHOLD ) ; nrf_radio_cca_corr_counter_set ( RADIO_CCA_CORR_LIMIT ) ; nrf_radio_mhmu_search_pattern_set ( 0 ) ; nrf_radio_mhmu_pattern_mask_set ( MHMU_MASK ) ; nrf_radio_int_enable ( NRF_RADIO_INT_FRAMESTART_MASK ) ; nrf_radio_int_enable ( NRF_RADIO_INT_END_MASK ) ; nrf_radio_int_enable ( NRF_RADIO_INT_DISABLED_MASK ) ; #if ! SHORT_CCAIDLE_TXEN nrf_radio_int_enable ( NRF_RADIO_INT_CCAIDLE_MASK ) ; #endif nrf_radio_int_enable ( NRF_RADIO_INT_CCABUSY_MASK ) ; nrf_radio_int_enable ( NRF_RADIO_INT_READY_MASK ) ; nrf_radio_int_enable ( NRF_RADIO_INT_BCMATCH_MASK ) ; nrf_radio_int_enable ( NRF_RADIO_INT_EDEND_MASK ) ; #if SHORT_CCAIDLE_TXEN nrf_radio_shorts_enable ( NRF_RADIO_SHORT_CCAIDLE_TXEN_MASK ) ; #endif }
Initialize radio peripheral and interrupts.
Initialize radio peripheral and interrupts .
// Configure CRC // Configure CCA // Configure MAC Header Match Unit