⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bootloader user api.c

📁 基于Freescale-smac的点对点通讯。 简介:在Router(特征:接口为COM口)上实现点对点通信。 子工程: 1、接收端receiver_13213_ver2.0 (目前只
💻 C
字号:
/********************************************************
application calls for Bootloader.


File: bootloader user api.c
  $Author: a20639 $
  $Date: 2006/07/31 17:21:59 $
  $Name:  $
********************************************************/
#include <hidef.h> /* for EnableInterrupts macro */
#include "pub_def.h"
#include "wireless_uart.h"
#include "bootloader user api.h"
#include "device_header.h"

// Include your current application header for PB assignments.
#include "freescale_radio_hardware.h"
#include "embedded_bootloader.h"

  /**********************************************************************/

// NOTE!!! This code is only added to get the symbols in the build. The linker will remove these symbols if not referenced.
// Hope to find a better way 21.10.03 MVC 



void boot_init() {

    if((Freescale_Copyright[0] == 0x00) || (Firmware_Database_Label[0] == 0x00) ||
       (SMAC_Version[0] == 0x00) || (SPHY_Version[0] == 0x00) ||	(NV_RAM_ptr->Freescale_Copyright[0] == 0x00) ||
       (NV_RAM0.MAC_Address[0] == 0x00) || (NV_RAM1.MAC_Address[0] == 0x00)) 
    {
      DisableInterrupts;
      NV_Data_Init();
    }
    if(boot_loader_control == ((uint8_t)0x00))
      DisableInterrupts;
    if(boot_loader_flag == ((uint8_t)0x00))
      DisableInterrupts;

  /**********************************************************************/
   
    BootLoader_Interface_Init();
}

void boot_call() {

		// Push all 4 buttons from reset to active BootLoader
	// Next time the board is reset it will start up in BootLoader mode
	if(PUSH_BUTTON1 == PB_PRESSED && 
		PUSH_BUTTON3 == PB_PRESSED)
		{
		
		  LED1 = 0;
		  LED2 = 0;
		  LED3 = 0;
		  LED4 = 0;
      Enable_Download_Firmware(ALL_BIT_ENABLED, DO_UPDATE_FIRMWARE);
            
      // Do a soft reset (execute illegal instruction
      Hard_Reset();
            
      // Wait for manual reset
      // for(;;);
		}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -