devtable.c

来自「nucleus 文件系统,内核和彩色图形系统,在小系统上非常好用」· C语言 代码 · 共 39 行

C
39
字号
/*
* EBS - RTFS (Real Time File Manager)
*
* Copyright Peter Van Oudenaren , 1993
* All rights reserved.
* This code may not be redistributed in source or linkable object form
* without the consent of its author.
*/
/***************************************************************************
PC_DEVICE - User supplied Device driver. 

        This now contains the PC_BDEVSW table. Routines in RTFS which
        need IO call the device drivers directly through the pc_bdevsw
        table. This model is much cleaner and eliminates a lot of layering.

        When you have your device drivers written plug them into this table.
        
        Call EBS if you haven't written your drivers yet. We may have one 
        available.
*
******************************************************************************/

#include "pcdisk.h"


/* External device functions. Replace these with your drivers. */

/* Ramdisk */
IMPORT BOOL pc_rd_open(UCOUNT driveno);
IMPORT BOOL pc_rd_raw_open(UCOUNT driveno);
IMPORT BOOL pc_rd_close(UCOUNT driveno);
IMPORT BOOL pc_rd_io(UCOUNT driveno, ULONG block, VOID FAR *buffer, UCOUNT count, BOOL do_read);
IMPORT BOOL pc_rd_ioctl(UCOUNT driveno, UCOUNT command, VOID *buffer);

_PC_BDEVSW pc_bdevsw[] = {
    {0,  pc_rd_open, pc_rd_raw_open, pc_rd_close, pc_rd_io, pc_rd_ioctl}, /* E: */
};

⌨️ 快捷键说明

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