QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1997|回复: 3

s3c2410

[复制链接]
发表于 2006-11-10 11:14:15 | 显示全部楼层 |阅读模式
本人对s3c2410 第三串口进行操作时,所读到的数据都是7F[?
请问那位兄弟知道怎样修改LINUX内核,才能使用第三串口?
发表于 2006-11-16 18:24:58 | 显示全部楼层
Did you notice that port 3's tx and rx are shared with port 2's ctx & rts, so you have to configure port to don't you hand shaking pins
回复

使用道具 举报

 楼主| 发表于 2006-11-18 14:25:20 | 显示全部楼层
#define GPIO_IR_TXD (GPIO_MODE_ALT0 | GPIO_PULLUP_DIS | GPIO_H6)
#define GPIO_IR_RXD (GPIO_MODE_ALT0 | GPIO_PULLUP_DIS | GPIO_H7)

static void __init smdk_map_io(void)
{
        s3c2410_map_io();
        iotable_init(smdk_io_desc);

        s3c2410_register_uart(0, 0);
        s3c2410_register_uart(1, 1);
        set_gpio_ctrl(GPIO_IR_TXD);
        set_gpio_ctrl(GPIO_IR_RXD);
        s3c2410_register_uart(2, 2);
内核在smdk.c里面set_gpio_ctrl(GPIO_IR_TXD);
            set_gpio_ctrl(GPIO_IR_RXD);
已经对IO口进行了功能定义了,请问在其他地方还需要设置吗?
我是初学者,请各位多多指教!
回复

使用道具 举报

发表于 2006-11-24 17:05:16 | 显示全部楼层
No you don't, actually you can not define it on user space.
Take of other kernel drivers, which may change the port setting, which you ignore;
to overcome this, compile the driver as module and after system startup, insmod it by hand.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-28 15:30 , Processed in 0.086886 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表