io.c

来自「AT91所有开发板的资料 AT91所有开发板的资料」· C语言 代码 · 共 59 行

C
59
字号
/* -*-C-*- * * $Revision: 1.3 $ *   $Author: mechavar $ *     $Date: 2000/05/01 19:37:08 $ * * Copyright (c) 2000 ARM, INC. * All Rights Reserved. * *   Project: BootStrap Loader * *    */#include "uhal.h"#include "bsl.h"#include "segdisp.h"#define	SHELL_SEG_PAT		(SEG_F | SEG_E | SEG_C | SEG_B)#define	AUTOBOOT_SEG_PAT	(SEG_A | SEG_G | SEG_D)void bsl_InitIO( void ){   unsigned	count;   /* light the leds */   count = uHALr_InitLEDs();   uHALir_SetLEDs( ALL_LEDS );      /* Turn on 7 segment display */   *(unsigned *)IOPMOD |= SEG_MASK;   *(unsigned *)IOPDATA |= SEG_MASK;}void SetLEDs(unsigned status){   uHALir_SetLEDs( ALL_LEDS & (status << 4));}void dispMode( int inShellMode ){   *(unsigned *)IOPDATA &= ~SEG_MASK; /* clear display */   if ( 0 != inShellMode )   {      *(unsigned *)IOPDATA |= SHELL_SEG_PAT;      if ( 2 == inShellMode )      {	 *(unsigned *)IOPDATA |= AUTOBOOT_SEG_PAT; /* for production test */      }   }   else   {      *(unsigned *)IOPDATA |= AUTOBOOT_SEG_PAT;   }}

⌨️ 快捷键说明

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