在Tornado2.2配置的hardware->peripherals->serial->SIO内增加N_SIO_CHANNELS参数配置串口个数

1.找到文件\Tornado2.2\target\config\comps\vxWorks\00bsp.cdf
2.在930行添加
Parameter N_SIO_CHANNELS {
NAME number of system serial ports
TYPE uint
DEFAULT 2
}
声明N_SIO_CHANNELS 参数变量
3.在428行 CFG_PARAMS NUM_TTY CONSOLE_TTY CONSOLE_BAUD_RATE
改为: CFG_PARAMS NUM_TTY CONSOLE_TTY CONSOLE_BAUD_RATE N_SIO_CHANNELS
添加 N_SIO_CHANNELS
HDR_FILES sysLib.h ttyLib.h stdio.h string.h ioLib.h
改为: HDR_FILES sysLib.h ttyLib.h stdio.h string.h ioLib.h config_uart.h
添加 config_uart.h
4.存盘->OK

posted on 2015-01-28 16:06  lion382  阅读(176)  评论(0编辑  收藏  举报