/************************************************************************************************** * @fn MAC_RfFrontendSetup * * @brief Setup RF frontend. * * @param none * * @return none ************************************************************************************************** */ void MAC_RfFrontendSetup(void) { /* CC2591 HGM pin control configuration. * P0_7 -> HGM */ HAL_PA_LNA_RX_HGM(); /* Raises the CCA threshold to about -70 dBm input level. */ CCACTRL0 = CCA_THR_HGM; /* Select power register value table and RSSI adjustment value table */ #if (defined MAC_RUNTIME_CC2591 && defined MAC_RUNTIME_CC2590) /* Select power register value table and RSSI adjustment value table. * Note that this file selected CC2591. The file has to be modified * if the target board has CC2590 instead. */ MAC_SetRadioRegTable(MAC_CC2591_TX_PWR_TABLE_IDX, MAC_CC2591_HGM_RSSI_ADJ_IDX); #elif defined (MAC_RUNTIME_CC2591) || defined (MAC_RUNTIME_CC2590) /* Select power register value table and RSSI adjustment value table */ MAC_SetRadioRegTable(MAC_CC259X_TX_PWR_TABLE_IDX, MAC_CC259X_HGM_RSSI_ADJ_IDX); #elif defined (HAL_PA_LNA) || defined (HAL_PA_LNA_CC2590) /* No need to do anything here because by default macRadioDefsRefTableId = 0 hence, * automatically setup for HGM. However if you want LGM modify this file and call * MAC_SetRadioRegTable(0, MAC_PA_LNA_LGM_RSSI_ADJ_IDX); */ #endif }
/************************************************************************************************** * @fn MAC_RfFrontendSetup * * @brief Setup RF frontend. * * @param none * * @return none ************************************************************************************************** */ void MAC_RfFrontendSetup(void) { /* CC2591 HGM pin control configuration * P0_7 -> HGM */ HAL_PA_LNA_RX_HGM(); /* Select power register value table and RSSI adjustment value table */ MAC_SetRadioRegTable(MAC_CC2591_TX_PWR_TABLE_IDX, MAC_CC2591_HGM_RSSI_ADJ_IDX); }