コード例 #1
0
void emAfRf4ceGdpGetPollConfigurationAttribute(uint8_t pairingIndex,
                                               uint8_t *pollConfiguration)
{
  halCommonGetIndexedToken(pollConfiguration,
                           TOKEN_PLUGIN_RF4CE_GDP_POLLING_CONFIGURATION_TABLE,
                           pairingIndex);
}
コード例 #2
0
EmberStatus halLaunchStandaloneBootloader(uint8_t mode)
{
  if(BOOTLOADER_BASE_TYPE(halBootloaderAddressTable.bootloaderType) 
     == BL_TYPE_STANDALONE) {
    // should never return
    if(mode == STANDALONE_BOOTLOADER_NORMAL_MODE) {
      // Version 0x0106 is where OTA bootloader support was added and the 
      //  RESET_BOOTLOADER_OTAVALID reset type was introduced.
      if(halBootloaderAddressTable.baseTable.version < 0x0106) {
        halInternalSysReset(RESET_BOOTLOADER_BOOTLOAD);
      } else {
        tokTypeStackCalData calData;
        // Convert channel number to index (bootloader only uses index).
        uint8_t channelIndex =  emGetPhyRadioChannel() - 11;

        halCommonGetIndexedToken(&calData, TOKEN_STACK_CAL_DATA, channelIndex);
        halResetInfo.boot.panId        = PAN_ID_REG;
        halResetInfo.boot.radioChannel = channelIndex;
        halResetInfo.boot.radioPower   = emGetPhyRadioPower();
        halResetInfo.boot.radioLnaCal  = calData.lna;
        // ota parameters valid bootloader reset
        halInternalSysReset(RESET_BOOTLOADER_OTAVALID);
      }
    } else if(mode == STANDALONE_BOOTLOADER_RECOVERY_MODE) {
      // standard bootloader reset
      halInternalSysReset(RESET_BOOTLOADER_BOOTLOAD);
    }
  }
  return EMBER_ERR_FATAL;
}
コード例 #3
0
uint8_t emAfRf4ceGdpGetPairingBindStatus(uint8_t pairingIndex)
{
  uint8_t status;
  halCommonGetIndexedToken(&status,
                           TOKEN_PLUGIN_RF4CE_GDP_BIND_TABLE,
                           pairingIndex);
  return status;
}