Advantech PCI-1736UP Especificaciones Pagina 151

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 159
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 150
Comedi
140 / 148
start: now|int
scan_begin: timer (contains the sampling interval. min 1ms)
convert: now
scan_end: count
stop: none|count
- Digital I/O
subdevice: 2
number of channels: 24 (first 8 bits on the D connector, 16 bits int.)
- PWM
subdevice: 3
number of channels: 8 or 4 + polarity output for H-bridge
(see INSN_CONFIG_PWM_SET_H_BRIDGE where
the first byte is the value and the
second the polarity)
max data value: 512
Configuration options:
The device requires firmware which is usually
uploaded automatically by udev/hotplug at the moment
the driver module is loaded.
In case udev/hotplug is not enabled you need to upload
the firmware with comedi_config -i usbdux_firmware.bin.
The firmware is usually installed under /lib/firmware
or can be downloaded form http://www.linux-usb-daq.co.uk.
6 Writing a Comedi driver
This section explains the most important implementations aspects of the Comedi device drivers. It tries to give the interested
device driver writer an overview of the different steps required to write a new device driver.
This section does not explain all implementation details of the Comedi software itself: Comedi has once and for all solved lots of
boring but indispensable infrastructural things, such as: timers, management of which drivers are active, memory management
for drivers and buffers, wrapping of RTOS-specific interfaces, interrupt handler management, general error handling, the /proc
interface, etc. So, the device driver writers can concentrate on the interesting stuff: implementing their specific interface card’s
DAQ functionalities.
In order to make a decent Comedi device driver, you must know the answers to the following questions:
How does the communication between user-space and kernel-space work?
What functionality is provided by the generic kernel-space Comedi functions, and what must be provided for each specific new
driver?
How to use DMA and interrupts?
What are the addresses and meanings of all the card’s registers?
This information is to be found in the so-called ‘register level manual’ of the card. Without it, coding a device driver is close to
hopeless. It is also something that Comedi (and hence also this handbook) cannot give any support or information for: board
manufacturers all use their own design and nomenclature.
6.1 Communication user-space — kernel-space
In user-space, you interact with the functions implemented in the Comedilib library. Most of the device driver core of the
Comedilib library is found in lib subdirectory.
Vista de pagina 150

Comentarios a estos manuales

Sin comentarios