| 数据搜索系统,热门电子元器件搜索 |
|
AN4503 数据表(PDF) 13 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4503 数据表(HTML) 13 Page - STMicroelectronics |
|
13 / 26 page ![]() DocID026411 Rev 2 13/26 AN4503 Linux kernel space 26 3.1.2 I²C_board_info structure patch static struct i2c_board_info __inidata panda_i2c_memsensors[] = { { I2C_BOARD_INFO("lps25h", 0x5d), .platform_data = & lps25h_platform, }, { I2C_BOARD_INFO("hts221", 0x5f), .platform_data = & hts221_platform, }, { I2C_BOARD_INFO("uvis25", 0x47), .platform_data = & uvis25_platform, } } 3.1.3 As an example of platform_data static struct hts221_platform_data hts221_platform = { .poll_interval = 1000, .min_interval = 100, } A structure with the same name is also in the hts221.h file for compiling the module driver of the corresponding device, included in [KR]/include/linux/input. 3.1.4 After rebuilding the kernel Copy the new built zImage in the proper [RAS]/device/ti/panda/ folder as 'kernel' and then rebuild the boot.img. [KR]$ cp -a arch/arm/boot/zImage $ANDROID_ROOT/device/ti/panda/kernel [RAS]$ make bootimage 3.2 Driver description The device drivers are the first interface with the hardware; they communicate directly with the sensor via the i2c bus. There are two files for each driver: the .c and the .h files. 3.2.1 How to build and install the device drivers To build the proper device drivers, the .c files must be placed in the <KR>/drivers/misc folder, while the corresponding .h files must be put in <KR>/include/lilnux/input. If the drives are compiled as separate modules, the following example demonstrates the lines to be added to the Makefile under <KR>/drivers/misc: obj-m = hts221.o obj-m + = lps25.o obj-m + = uv.ko |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |