📄 readme.console
字号:
/* * (C) Copyright 2000 * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it * * See file CREDITS for list of people who contributed to this * project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */U-Boot console handling========================HOW THE CONSOLE WORKS?----------------------At system startup U-Boot initializes a serial console. When U-Bootrelocates itself to RAM, all console drivers are initialized (theywill register all detected console devices to the system for furtheruse).If not defined in the environment, the first input device is assignedto the 'stdin' file, the first output one to 'stdout' and 'stderr'.You can use the command "coninfo" to see all registered consoledevices and their flags. You can assign a standard file (stdin,stdout or stderr) to any device you see in that list simply byassigning its name to the corresponding environment variable. Forexample: setenv stdin wl_kbd <- To use the wireless keyboard setenv stdout video <- To use the video consoleDo a simple "saveenv" to save the console settings in the environmentand get them working on the next startup, too.HOW CAN I USE STANDARD FILE INTO THE SOURCES?---------------------------------------------You can use the following functions to access the console:* STDOUT: putc (to put a char to stdout) puts (to put a string to stdout) printf (to format and put a string to stdout)* STDIN: tstc (to test for the presence of a char in stdin) getc (to get a char from stdin)* STDERR: eputc (to put a char to stderr) eputs (to put a string to stderr) eprintf (to format and put a string to stderr)* FILE (can be 'stdin', 'stdout', 'stderr'): fputc (like putc but redirected to a file) fputs (like puts but redirected to a file) fprintf (like printf but redirected to a file) ftstc (like tstc but redirected to a file) fgetc (like getc but redirected to a file)Remember that all FILE-related functions CANNOT be used beforeU-Boot relocation (done in 'board_init_r' in common/board.c).HOW CAN I USE STANDARD FILE INTO APPLICATIONS?----------------------------------------------Use the 'bd_mon_fnc' field of the bd_t structure passed to theapplication to do everything you want with the console.But REMEMBER that that will work only if you have not overwritten anyU-Boot code while loading (or uncompressing) the image of yourapplication.For example, you won't get the console stuff running in the Linuxkernel because the kernel overwrites U-Boot before running. Onlysome parameters like the framebuffer descriptors are passed to thekernel in the high memory area to let the applications (the kernel)use the framebuffers initialized by U-Boot.SUPPORTED DRIVERS-----------------Working drivers: serial (architecture dependent serial stuff) video (mpc8xx video controller)Work in progress: wl_kbd (Wireless 4PPM keyboard)Waiting for volounteers: lcd (mpc8xx lcd controller; to )TESTED CONFIGURATIONS---------------------The driver has been tested with the following configurations (seeCREDITS for other contact informations):- MPC823FADS with AD7176 on a PAL TV (YCbYCr) - arsenio@tin.it- GENIETV with AD7177 on a PAL TV (YCbYCr) - arsenio@tin.it
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -