cons.c

来自「一款类linux的操作系统源码」· C语言 代码 · 共 47 行

C
47
字号
#include <ctype.h>
#include <dev/cons.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/config.h>
#include <sys/intr.h>
#include <sys/ioctl.h>
#include <dev/lcd.h>

int
cons_init()
{
    return 0;
}

int
cons_shut()
{
    return 0;
}

int
cons_ioctl(int cmd, void *args)
{
    switch (cmd) {
    case GET_BUFFER_SIZE:
	if (args == NULL)
	    return EINVAL;
	*((u_long *) args) = 1;
	break;


    default:
	return ENOTTY;
    }
    return 0;
}

int
cons_put(int c)
{
    disable;
    lcd_put((char) c);
    enable;
    return 0;
}

⌨️ 快捷键说明

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