Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
resources:tools-software:linux-drivers:iio-adc:ad7998 [16 Nov 2012 13:29] – [Reference Circuit Notes] fix heading Lars-Peter Clausenresources:tools-software:linux-drivers:iio-adc:ad7998 [29 Jan 2014 21:01] – [Example platform device initialization] Lars-Peter Clausen
Line 62: Line 62:
 </code> </code>
  
-<note tip>+<WRAP tip>
 In case platform_data is not present or set to NULL, the driver will use the AD7998 internal reference. In case platform_data is not present or set to NULL, the driver will use the AD7998 internal reference.
-</note>+</WRAP>
  
 {{page>software/linux/docs/platform_and_bus_model#Declaring I2C devices&firstseconly&noeditbtn}} {{page>software/linux/docs/platform_and_bus_model#Declaring I2C devices&firstseconly&noeditbtn}}
Line 96: Line 96:
 </code> </code>
  
-====== Adding Linux drive +====== Adding Linux driver support ======
-support ======+
  
 Configure kernel with "make menuconfig" (alternatively use "make xconfig" or Configure kernel with "make menuconfig" (alternatively use "make xconfig" or
 "make qconfig") "make qconfig")
  
-<note>+<WRAP round help>
 The AD7998 Driver depends on **CONFIG_I2C** The AD7998 Driver depends on **CONFIG_I2C**
-</note>+</WRAP>
  
 <code> <code>
Line 133: Line 132:
 {{page>software:linux:docs:iio:iio_snippets#iio device files&noheader&firstseconly&noeditbtn}} {{page>software:linux:docs:iio:iio_snippets#iio device files&noheader&firstseconly&noeditbtn}}
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/> **cd /sys/bus/iio/devices/** root:/> **cd /sys/bus/iio/devices/**
Line 158: Line 157:
 drwxr-xr-x    2 root     root             0 Jan  1 00:00 trigger drwxr-xr-x    2 root     root             0 Jan  1 00:00 trigger
 -rw-r--r--    1 root     root          4096 Jan  1 00:00 uevent -rw-r--r--    1 root     root          4096 Jan  1 00:00 uevent
-</xterm></box>+</xterm></WRAP>
  
 === Show device name === === Show device name ===
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0024/iio:device0> **cat name** root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0024/iio:device0> **cat name**
 ad7998 ad7998
-</xterm></box>+</xterm></WRAP>
  
 === Show scale === === Show scale ===
Line 173: Line 172:
 scale to be applied to in_voltage0_raw in order to obtain the measured voltage in millivolts. scale to be applied to in_voltage0_raw in order to obtain the measured voltage in millivolts.
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0024/iio:device0> **cat in_voltage_scale** root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0024/iio:device0> **cat in_voltage_scale**
 1.000 1.000
-</xterm></box>+</xterm></WRAP>
  
 === Show channel 0 measurement === === Show channel 0 measurement ===
Line 184: Line 183:
 Raw unscaled voltage measurement on channel 0 Raw unscaled voltage measurement on channel 0
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0024/iio:device0> **cat in_voltage0_raw** root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0024/iio:device0> **cat in_voltage0_raw**
 1491 1491
-</xterm></box>+</xterm></WRAP>
  
 **U** = //in_voltage0_raw * in_voltage_scale// = 1491 * 1.000 = **1491,00 //mV//** **U** = //in_voltage0_raw * in_voltage_scale// = 1491 * 1.000 = **1491,00 //mV//**
Line 202: Line 201:
 ===== Buffer management ===== ===== Buffer management =====
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0024/iio:device0/buffer> **ls** root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0024/iio:device0/buffer> **ls**
 **enable**  **length** **enable**  **length**
 root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0024/iio:device0/buffer> root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0024/iio:device0/buffer>
-</xterm></box>+</xterm></WRAP>
  
 {{page>software:linux:docs:iio:iio_snippets#Buffer management&noheader&firstseconly&noeditbtn}} {{page>software:linux:docs:iio:iio_snippets#Buffer management&noheader&firstseconly&noeditbtn}}
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0024/iio:device0/scan_elements> **ls** root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0024/iio:device0/scan_elements> **ls**
Line 220: Line 219:
 in_voltage2_en           in_voltage4_index        in_voltage7_en           timestamp_type in_voltage2_en           in_voltage4_index        in_voltage7_en           timestamp_type
 root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0024/iio:device0/scan_elements> root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0024/iio:device0/scan_elements>
-</xterm></box>+</xterm></WRAP>
  
  
resources/tools-software/linux-drivers/iio-adc/ad7998.txt · Last modified: 05 Jan 2021 16:01 by Ioana Chelaru