| Electronic Components Datasheet Search |
|
UM0851 Datasheet(PDF) 186 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0851 Datasheet(HTML) 186 Page - STMicroelectronics |
|
186 / 245 page ![]() Human interface device (HID) drivers UM0851 186/245 Doc ID 16604 Rev 2 Block devices: 1 ramdisk 31 mtdblock After obtaining the major number of the ADC, create ADC nodes using the following commands: mknod /dev/adcx c major x /* Above command must be executed for x = 0 -> 7 */ These user level nodes may then be used for any further interaction with the ADC driver/hardware. Kernel level: Kernel modules must include drivers/char/spr_adc_st10.h file to access data types related to the ADC. All kernel level calls expect the first argument to be a pointer unique to the calling module. This pointer is kept in the ADC driver to track the owner of an ADC channel. In the following examples, ADC channel 0 is used as the configuring channel. Open / get channel To access any of the avaialble ADC features, you must acquire/get an ADC channel. The channel can be opened using the open() call: User level: fd = open("/dev/adc0", O_RDWR); On success, a positive file descriptor number is returned otherwise -1 is returned and errno is set appropriately. This file descriptor is used for any further communication with the ADC device. Kernel level: /* dev: pointer unique to the calling module */ spear_adc_chan_get(dev, ADC_CHANNEL0); On success, zero is returned otherwise negative standard kernel errors are returned. The above functions will be successful if the requested ADC channel is free and the ADC device is not already being used in SINGLE_CONVERSION mode. Configure ADC Before converting data on an ADC channel, you must configure the ADC. There are two types of configurations possible for the ADC. ● Common configuration: This configuration is common to all ADC channels. It does not have to be done every time you want to use the ADC. It must be configured keeping in mind that it affects all ADC channels. During ADC module initialization, common configuration is configured with the default configuration passed from the platform data present in arch/arm/mach-spear*/spear*.c. This common configuration may not need to be changed. ● Channel configuration: this configuration is for a particular ADC channel. ADC device configuration |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |