s3c2410
本人对s3c2410 第三串口进行操作时,所读到的数据都是7F[?请问那位兄弟知道怎样修改LINUX内核,才能使用第三串口? 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 #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口进行了功能定义了,请问在其他地方还需要设置吗?
我是初学者,请各位多多指教! 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.
页:
[1]