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

📄 ide_test.c

📁 dm270 source code
💻 C
字号:
/*
Module Name	: ide_test.c

Functions	: IDE_TEST
    
Purpose		: Test ide function

Notes		: 
This function is initialize ide and compare hard disk code
*/

// Local header files
#include <demo/uart270.h>
#include <demo/sagiters.h>

// Global variables
extern unsigned short drive_info_src[10];

// Extern global variables
extern char UART_outBuff[1024];

const unsigned short hard_disk_info[] = 
{
0x4849, 0x5441, 0x4348, 0x495F, 0x444B,
0x3134, 0x4641, 0x2D32, 0x3020, 0x2020
};

//
// Test ide, read hard disk code 

void IDE_TEST(void){
	unsigned int check;
	
	UART_sendString( UART0, "\r\n ****************IDE  TEST****************" );
	
	IDE_CTRL(ON);	
	ide_drive();
	check = 0;
	check = memcmp(drive_info_src, hard_disk_info, 10);
	if( check == 0 )
		UART_sendString( UART0, "\r\n PASS " );
	else
		UART_sendString( UART0, "\r\n ERROR " );

	UART_sendString( UART0, "\r\n " );
	
	IDE_CTRL(OFF);
}

⌨️ 快捷键说明

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