xr20m117x-lnx3.xx-pak_ver1.1
所属分类:单片机开发
开发工具:C/C++
文件大小:10KB
下载次数:4
上传日期:2016-03-09 17:04:55
上 传 者:
phoenix_wanng
说明: xrm117x spi 转uart驱动代码,可以将spi 物理接口扩展出两个uart 接口
(xrm117x spi transfer to uart driver code,it can extend uart number in your project!!)
文件列表:
xr20m117x-lnx3.xx-pak_ver1.1 (0, 2015-04-11)
xr20m117x-lnx3.xx-pak_ver1.1\xrm117x.c (37103, 2015-04-11)
Exar I2c Serial Driver
======================
Version 1.1, 4/10/2015
This driver will work with any I2C/SPI UART function in these Exar devices:
XR20M1170/XR20M1172
Integrated into your system
---------------------------
1.Please copy the driver file to the kernel directory:$kernel_src\drivers\tty\serial
2.Add the follow define into the $kernel_src\drivers\tty\serial\Makefile for compile the driver.
obj-$(CONFIG_SERIAL_XR20M117X) += xrm117x.o
3.Run the make menuconfig and select the XRM117x serial support at the driver/tty/serial and save the config.
4 if you use the I2c mode:
Remove the macro define "#define USE_SPI_MODE 1" at the file top position.
Define the i2c_board_info object on your board file similar the follow:
static struct i2c_board_info smdk4x12_i2c_devs1[] __initdata = {
{
I2C_BOARD_INFO("xrm117x", 0x30),
.platform_data = &ft5x0x_pdata,
.irq = IRQ_EINT(14),
}
};
5.if you use the SPI mode:
Add the macro define "#define USE_SPI_MODE 1" at the file top position.
Define the spi0_board_info object on your board file similar the follow:
static struct spi_board_info spi0_board_info[] __initdata = {
{
.modalias = "xrm117x_spi",
.platform_data = NULL,
.max_speed_hz = 10*1000,
.bus_num = 0,
.chip_select = 0,
.mode = SPI_MODE_0,
.controller_data = &spi0_csi[0],
.irq = IRQ_EINT(25),
}
};
* if you need change the xtal freq, you can modify it at about line:1087
freq = 14745600;
Technical Support
-----------------
Send any technical questions/issues to uarttechsupport@exar.com.
近期下载者:
相关文件:
收藏者: