devtbl.c
来自「《嵌入式固件开发》一书的源码」· C语言 代码 · 共 27 行
C
27 行
#include "devices.h"#include "devtbl.h"/* device table: This table should contain all of the device driver functions (cntrl/open/close/read/write) for each device in the system. This allows all devices to be accessed through read/write/ioctl functions; thus, making the application code somewhat independent of the underlying hardware. This scheme is taken from XINU.*/int ConsoleDevice = 0;struct device devtbl[] = {#if 0 { tty0init, tty0ctrl, nodriver, nodriver, /* TTY0 */ tty0read, tty0write, "PPC403_UARTA" }, { tty1init, tty1ctrl, nodriver, nodriver, /* TTY1 */ tty1read, tty1write, "PPC403_UARTB" },#endif { 0,0,0,0,0,0,(char *)0 }};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?