Electronic Components Datasheet Search
  English  ▼

X  

UM0851 Datasheet(PDF) 186 Page - STMicroelectronics

Part # UM0851
Description  SPEAr is a family of highly customizable ARM-based embedded
PDF  245 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0851 Datasheet(HTML) 186 Page - STMicroelectronics

Back Button UM0851 Datasheet HTML 182Page - STMicroelectronics UM0851 Datasheet HTML 183Page - STMicroelectronics UM0851 Datasheet HTML 184Page - STMicroelectronics UM0851 Datasheet HTML 185Page - STMicroelectronics UM0851 Datasheet HTML 186Page - STMicroelectronics UM0851 Datasheet HTML 187Page - STMicroelectronics UM0851 Datasheet HTML 188Page - STMicroelectronics UM0851 Datasheet HTML 189Page - STMicroelectronics UM0851 Datasheet HTML 190Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 186 / 245 page
background image
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



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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