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

📄 menu.c

📁 使用JTAG口对AT91R40008芯片进行FLASH编程的程序
💻 C
字号:
//*----------------------------------------------------------------------------
//*      ATMEL Microcontroller Software Support  -  ROUSSET  -
//*----------------------------------------------------------------------------
//* The software is delivered "AS IS" without warranty or condition of any
//* kind, either express, implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose, or against the infringements of
//* intellectual property rights of others.
//*----------------------------------------------------------------------------
//* File Name           : menu.c
//* Object              : menu for Audio extention board
//*
//* 1.0 16/01/02 JPP    : Creation,
//*----------------------------------------------------------------------------

//* --------------------------- include file ----------------------------------
#include    "menu.h"
extern void test_menu(void);

//*----------------------------------------------------------------------------
//* Function Name       : print_default
//* Object              : print default message
//* Input Parameters    : none
//* Output Parameters   : none
//*----------------------------------------------------------------------------
void print_default(void)
{//* Begin
        at91_print(&COM0,"Invalid command entered. Please enter new command!\n\r");
}//* End
//*----------------------------------------------------------------------------
//* Function Name       : get_info
//* Object              : Get keyboard info
//* Input Parameters    : none
//* Output Parameters   : none
//*----------------------------------------------------------------------------
int get_info(void)
{//* Begin

	//* read Usart interface
    return at91_getch(&COM0,&command);

}//* End

//*----------------------------------------------------------------------------
//* Function Name       : main_menu
//* Object              : Main function of Polling USART 0
//* Input Parameters    : none
//* Output Parameters   : True
//*----------------------------------------------------------------------------
void main_menu( void )
{//* Begin
    //init global data

	for (;;)
  	{

    at91_print(&COM0,"\n\r0)Xmodem\n\r1)Test\n\r");

	while (get_info()) {}
    	switch (command)
    	{
        case'0':
			flash_menu();
        break;
        case'1':
          test_menu();
        break;

		default:
			 print_default();
        break;
    	} //* End switch
  	}//* End while
}//* End

⌨️ 快捷键说明

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