Home

DM5810/DM6810 Driver for Linux Driver Version 2.0.x User`s Manual

image

Contents

1. InitBoard6810 void InitBoard6810 void Description Initialize DM6810 device class library state This consists of clearing the library s internal cache of the board s Clear IRQ IRQ Enable Register value NOTE This function does not update the board s Clear IRO IRO Enable Register Parameters None Return Value None IOCTL Interface None 330 0 0 0 0 DM5810 DM6810 Driver for Linux IsP14TIRQ68 10 bool IsP14IRQ68 10 void Description Determine whether or not a board s interrupt circuit generated a P14 interrupt NOTE The information returned by this function is unreliable because the driver s interrupt handler clears all interrupt status flags during interrupt acknowledgement Parameters None Return Value false No interrupt occurred true An interrupt occurred IOCTL Interface dm6810_ioctl_argument_t ioctl_request int file_descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here 37 Read the IRQ Status Register at base I O address 17 GA ioctl_request access_8 offset 0x11 This value does not matter because it is ignored making the request However after ioctl returns the structure member will contain the register contents 7 ioctl_request access_8 data 0 status ioctl file_descriptor DM6810 IOCTL READ 8 BITS amp ioctl request if status 0 if ioctl_request access_8 data amp 0x0
2. false Failure Please see the open 2 man page for information on possible values errno may have in this case 39 DM5810 DM6810 Driver for Linux IOCTL Interface None ReadByte68 10 bool ReadByte68 10 u_int8_t offset u_int8_t data_p Description Read an 8 bit value from the given offset within a DM6810 board s I O memory NOTE It is strongly suggested that you use other library functions instead of directly accessing a board s registers Parameters offset Offset within I O memory to read data_p Address where data read should be stored Nothing is written here if the function fails Return Value true Success false Failure with errno set as follows EINVAL offset is not valid EOPNOTSUPP offset is valid but it represents a write only register Please see the ioctl 2 man page for information on other possible values errno may have in this case IOCTL Interface dm6810_ioctl_argument_t ioctl_request int file_descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here ey Read the IRQ Status Register at base I O address 17 ef ioctl_request access_8 offset 0x11 This value does not matter because it is ignored making the request However after ioctl returns the structure member will contain the register contents Er DM5810 DM6810 Driver for Linux 40 ioctl_request access_8 data 0 status ioctl file_de
3. amp 5 Therefore clearing the Strobe Status bit for a port also clears the Strobe Status bit for the other port in the pair DM5810 DM6810 Driver for Linux 18 NOTE DIOClearChip6810 does not clear the Strobe Status bit During program initialization DIOClearStrobe6810 must be called to ensure that the bit is cleared Once data is being strobed into an even numbered port reading data from that port will clear the Strobe Status flag NOTE Even though this function accepts an odd numbered port it is internally translated into the even numbered port in the pair since only the even numbered ports support data strobing Parameters Port Digital I O port to clear strobe status of Valid values are 0 Digital VO port 0 1 Digital VO port 1 2 Digital I O port 2 3 Digital I O port 3 4 Digital I O port 4 5 Digital VO port 5 Return Value true Success false Failure with errno set as follows EINVAL Port is not valid IOCTL Interface dm6810 ioctl argument t ioctl request int file descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here xy Read the Digital I O Port 0 Register at base I O address 0 of ioctl_request access_8 offset 0x00 This value does not matter because it is ignored making the request ed ioctl_request access_8 data 0 status ioctl file_descriptor DM6810_IOCTL_READ_8 BITS amp ioctl_request po DM5810 DM6810 Driver fo
4. Any other value means enable interrupt sharing Return Value true Success false Failure Please see the description of the internal function outb for information on possible values errno may have in this case IOCTL Interface dm6810_ioctl_argument_t ioctl_request int file_descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here 27 DM5810 DM6810 Driver for Linux 32 Write to the IRQ Enable Register at base I O address 16 ay ioctl_request access_8 offset 0x10 Enable P14 interrupt Because bit 1 is set to zero interrupts occur on positive edge of pulse od ioctl_request access_8 data 0x01 Disable IRQ sharing ed ioctl_request access_8 data 0x04 status ioctl file_descriptor DM6810_IOCTL_WRITE_8_BITS amp ioctl_request EnableP14IRO6810 bool EnableP14IRO6810 bool Enable Description Enable or disable P14 interrupts on a DM6810 device NOTE This function also modifies the library s internal cache of the board s Clear IRQ IRQ Enable Register value Parameters Enable Flag indicating whether or not P14 interrupts should be enabled A value of true means enable P14 interrupts A value of false means disable P14 interrupts Return Value true Success false Failure Please see the description of the internal function outb for information on possible values errno may have in this case IOCT
5. Building the Example Programs The example programs may be compiled by changing your current directory to examples and issuing the command make which builds all the example programs If you wish to compile a subset of example programs there are targets in Makefile to do so For example the command make digital interrupts digital io interrupt wait will compile and link the source files digital interrupts cpp digital io cpp and interrupt wait cpp The GNU C compiler g is used to compile the example program code 9 DM5810 DM6810 Driver for Linux Interrupt Performance Performance Issues Many factors exist outside of the driver software that may impact interrupt performance and throughput For a discussion of these issues please see the Application Note SWM 640000021 Linux Interrupt Performance on our web site Rewriting the Interrupt Handler Suppose that you have the following requirements 1 the only interrupt being used is the digital interrupt on port 0 1 2 whenever a digital interrupt occurs the value on digital I O port 2 should be read and 3 on digital interrupt occurrence the value 0x01 should be written to digital I O port 5 Furthermore assume the interrupts occur fast enough that dealing with them in user space is unreliable Because the interrupt handler provided with the driver offers generic services suitable for a wide range of purposes it does not provide the functionality indicated above There
6. SOME STATES DO NOT ALLOW LIMITATIONS ON HOW LONG AN IMPLIED WARRANTY LASTS SO THE ABOVE LIMITATIONS OR EXCLUSIONS MAY NOT APPLY TO YOU THIS WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS AND YOU MAY ALSO HAVE OTHER RIGHTS WHICH VARY FROM STATE TO STATE DM5810 DM68 10 Driver for Linux RTD Embedded Technologies Inc 103 Innovation Boulevard State College PA 16803 0906 USA Our website www rtd com DM5810 DM6810 Driver for Linux 46
7. each other and 3 illustrates the methods used to transfer data and control information Application Application Application C Function Calls C Function Calls C Function Calls Library ioctl System Calls User Space Kernel Space Driver Software Memory Accesses Hardware Electrical Signals Hardware 5 DM5810 DM6810 Driver for Linux Notational Conventions RTD Linux drivers are assigned version numbers These version numbers take the form A B C where A is the major release number This will be incremented whenever major changes are made to the software Changing the major release number requires updating the software manual B is the minor release number This will be incremented whenever minor yet significant changes are made to the software Changing the minor release number requires updating the software manual C is the patch level number This will be incremented whenever very minor changes are made to the software Changing the patch level number does not require updating the software manual In this document you will see driver version numbers with a letter in them For example 2 0 x indicates that the topic being discussed is applicable to driver versions with a major release number of 2 a minor release number of 0 and any patch level number Occasionally you will notice text placed within the lt and gt characters for example lt installation path gt This indicates that the t
8. ee dees bee 12 API FUNCTION GROUPS ss ee ds es ge os gs Ge ee Ee de de sg eke ee Ee ge ee be ee ee Ge ee Tee ss 13 BYE MYN Pl ie ER N OE EE EE ER OE OE EE ON ON 13 GENERAL ASE eo ee day E ee ee ee EE Ee GE ae Re ge Does cued ER es ee Re ee oe ee see 13 INTERRUPT CONTROL AND STATUS iese sesse sesse ee ee ee ee ee ee ee ee ee ee ee Re ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee 13 TIMER COUNTER CONTROL AND STATUS eie esse see sees ee ee ee ee ee ee ee ee ee ee ee Re eee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee 13 ALPHABETICAL FUNCTION LISTING esse sees sesse esse ee ee ese ee Ge ee Gee Ge Ge Ge ee ee 14 EXAMPLE PROGRAMS REFERENCE esse ee esse sesse ee ee esse se ee ee esse ee ee ee ee see see ee ee ee dd LIMITED WARRANTY biiicsicccescoscasscsscdscesccccanscesdescescescscestsutacceacseesecessoscessedesseossececacsssesseasctescees 45 DM5810 DM6810 Driver for Linux iv Introduction This document targets anyone wishing to write Linux applications for an RTD DM5810 or DM6810 dataModule It provides information on building the software and about the Application Programming Interface used to communicate with the hardware and driver Each high level library function is described as well as any low level ioctl system call interface it may make use of The diagram below 1 provides a general overview of what hardware and software entities are involved in device access 2 shows which units communicate with
9. mY Read the Port 2 3 Digital I O Status Register at base I O address 7 EL ioctl_request access_8 offset 0x07 This value does not matter because it is ignored making the request However after ioctl returns the structure member will contain the register contents mf ioctl_request access_8 data 0 status ioctl file_descriptor DM6810_IOCTL_READ_8 BITS amp ioctl_request if status 0 If bit 7 is set then interrupt occurred on port 2 3 sy if ioctl_request access_8 data amp 0x80 fprintf stdout Digital I O port 2 3 generated an interrupt n DIOIsStrobe6810 bool DIOIsStrobe6810 u int8 t Port Description Determine whether or not data has been strobed into the given digital I O port NOTE The digital VO ports exist in pairs Ports 0 amp 1 form a pair as do ports 2 amp 3 and ports 4 amp 5 Therefore the strobe state for a port is indistinguishable from the strobe state for the other port in the pair NOTE Only the even numbered ports support data strobing Parameters Port Digital I O port to examine strobe status of Valid values are 0 Digital VO port 0 1 Digital VO port 1 2 Digital VO port 2 3 Digital I O port 3 4 Digital I O port 4 5 Digital VO port 5 3B 0 0 0 0 DM5810 DM6810 Driver for Linux Return Value false Data not strobed true Data strobed IOCTL Interface dm6810_ioctl_argument_t ioctl_request int file_d
10. to output Return Value true Success false Failure with errno set as follows EINVAL Port is not valid Please see the description of the internal functions outb and select_dio_control_register for information on other possible values errno may have in this case IOCTL Interface This function makes use of several ioctl requests DM5810 DM6810 Driver for Linux 28 DIOStrobeEnable6810 bool DIOStrobeEnable68 10 u_int8_t Port bool Enable Description Enable or disable data strobing for the given digital I O port NOTE The digital I O ports exist in pairs Ports 0 amp 1 form a pair as do ports 2 amp 3 and ports 4 amp 5 Therefore changing the data strobe state for a port also changes the data strobe state for the other port in the pair NOTE Only the even numbered ports support data strobing Parameters Port Port to set data strobing for Valid values are 0 Digital VO port 0 1 Digital VO port 1 2 Digital VO port 2 3 Digital I O port 3 4 Digital I O port 4 5 Digital I O port 5 Enable Flag indicating whether or not data strobe should be enabled A value of true means enable data strobe A value of false means disable data strobe Return Value true Success false Failure with errno set as follows EINVAL Port is not valid Please see the description of the internal function outb for information on other possible values errno may have in this case IOCTL Interface This funct
11. value does not matter because it is ignored making the request However after ioctl returns the structure member will contain the register contents XY ioctl request access 8 data 0 status ioctl file descriptor DM6810 IOCTL READ 8 BITS amp ioctl request if status 0 fprintf stdout Port 1 input 0x xYn ioctl request access 8 data DIOSelectClock6810 bool DIOSelectClock6810 u int8 t Port bool Programmable Description Select sampling clock for the given digital VO port NOTE The digital I O ports exist in pairs Ports 0 amp 1 form a pair as do ports 2 amp 3 and ports 4 amp 5 Therefore setting the sampling clock for a port also sets the same sampling clock for the other port in the pair Parameters Port Port to set clock for Valid values are 0 Digital VO port 0 1 Digital I O port 1 2 Digital VO port 2 3 Digital I O port 3 4 Digital I O port 4 5 Digital VO port 5 Programmable Flag to indicate whether or not 8254 Timer Counter should be used A value of false means use the 8 MHz system clock A value of true mean use the 8254 Timer Counter 1 as DM5810 DM6810 Driver for Linux Return Value true Success false Failure with errno set as follows EINVAL Port is not valid Please see the description of the internal function outb for information on other possible values errno may have in this case IOCTL Interface This function makes use of s
12. version 2 0 0 existing source code which uses the library will not compile Some of the areas requiring attention on your part are All header files have been renamed Users upgrading from a previous driver version will need to modify source code to include the appropriate header files All header files have been relocated to include Be sure to update any files which contain hardcoded header file paths 6810 has been appended to all library function names with the exception of class constructors and destructors Library functions which accepted a digital I O chip number now accept a digital I O port number Interrupt notification via signals is no longer supported The new notification paradigm provides a function which can block in the kernel until an interrupt occurs The driver now acknowledges all interrupts in the interrupt handler Therefore interrupt status is no longer available to an application through certain functions All classes have been coalesced into a single class DM68 10Device The DM6810 dev entry file names have changed For example the device file previously named dev rtd dm681Ohr device0 is now called dev rtd dm68 10 0 The following function reference provides for each library routine a prototype description explanation of parameters and return value or error code By looking at a function s entry you should gain an idea of 1 why it would be used 2 what it does 3 what information is passed into it
13. 4 what information it passes back 5 how to interpret error conditions that may arise and 6 the ioctlQ system call interface if the function makes use of a single ioctl call Note that errno codes other than the ones indicated in the following pages may be set by the library functions Please see the ioctl 2 man page for more information 10 0 00 0 DM5810 DM6810 Driver for Linux Function Reference DM5810 DM6810 Driver for Linux API Function Groups Digital VO DIOClearChip6810 DIOClearlrg6810 DIOClearStrobe6810 DIOEnablelrg6810 DIOIsIrg6810 DIOIsIRQ6810 DIOIsStrobe68 10 DIORead6810 DIOSelectClock68 10 DIOSelectRegister68 10 DIOSetIROSource6810 DIOSetPortDirection6810 DIOStrobeEnable6810 DIOWrite68 10 General CloseBoard6810 DM6810Device DM6810Device GetDriverVersion68 10 InitBoard6810 OpenBoard68 10 ReadByte68 10 WriteB yte68 10 Interrupt Control and Status ClearP14IRQ6810 EnableIRQSharing68 10 EnableP14IRQ6810 GetIRQStatus68 10 GetLastIntStatus68 10 IsP14IRQ6810 LoadIRQRegister68 10 SetP14IRQPolarity68 10 Timer Counter Control and Status ClockDivisor6810 ClockMode68 10 DoneTimer68 10 ReadTimerCounter68 10 SetUserClock6810 13 DM5810 DM68 10 Driver for Linux Alphabetical Function Listing ClearP14TRQ6810 void ClearP14IRQ68 1 0 void Description Clear a DM6810 device s P14 interrupt status flag This will acknowledge a P14 interrupt which has occurred NOTE There is no n
14. 8 fprintf stdout P14 interrupt occurred n LoadIRQRegister68 10 bool LoadIRQRegister68 10 u_int8_t Value Description Load an 8 bit value into a board s Clear IRQ IRQ Enable Register at base I O address 16 DM5810 DM6810 Driver for Linux 38 NOTE This function also sets the library s internal cache of the board s Clear IRQ IRQ Enable Register value Parameters Value Value to store in register Valid values are 0 through 7 Please see the hardware manual for the interpretation of the register s bits Return Value true Success false Failure Please see the description of the internal function outb for information on possible values errno may have in this case IOCTL Interface dm6810 ioctl argument t ioctl request int file descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here Write to the IRQ Enable Register at base I O address 16 ay ioctl_request access_8 offset 0x10 Enable P14 interrupt bit 0 1 set IRQ polarity to negative edge bit 1 1 and disable IRQ sharing bit 2 1 zl ioctl request access 8 data 0x07 status ioctl file descriptor DM6810 IOCTL WRITE 8 BITS amp ioctl request OpenBoard6810 bool OpenBoard6810 u int32 t nDevice Description Open a DM6810 device file Parameters nDevice Minor number of DM6810 device file Return Value true Success
15. 810_IOCTL_READ_8 BITS amp ioctl_request if status 0 fprintf stdout IRQ Status 0x xYn ioctl_request access_8 data amp OxF 35 DMS5810 DM6810 Driver for Linux GetLastIntStatus68 10 bool GetLastIntStatus68 10 u_int32_t int_count_p u_int8_t status_reg_p bool wait_for_interrupt Description Get the driver s interrupt count and IRQ Status Register value at the time of the most recent interrupt NOTE This function can be used to provide interrupt notification if wait for interrupt is set to true In this case the function does not exit the kernel until the driver s interrupt handler wakes the process up NOTE If wait for interrupt is true this function will always wait for the next interrupt to occur even if an interrupt just happened NOTE Only bits 0 through 3 in the IRQ Status Register are returned NOTE If you are using this function to wait for interrupts signals can wake up the process before an interrupt occurs If a signal is delivered to the process during a wait no status or count is returned and the application is responsible for dealing with the premature awakening in a reasonable manner Parameters int_count_p Address where interrupt count should be stored Nothing is written here if the function fails status_reg_p Address where Status Register value should be stored Nothing is written here if the function fails wait_for_interrupt Flag indicating whether or
16. DM5810 DM6810 Driver for Linux Driver Version 2 0 x User s Manual TIGO RTD Embedded Technologies Inc Real Time Devices Accessing the Analog World SWM 640010019 rev B ISO9001 and AS9100 Certified RTD Embedded Technologies Inc 103 Innovation Boulevard State College PA 16803 0906 Phone 1 814 234 8087 FAX 1 814 234 5218 E mail sales rtd com techsupport rtd com web site http www rtd com DM5810 DM6810 Driver for Linux ii Revision History 01 17 2005 Revision A issued Documented for ISO9000 09 29 2005 Revision B issued Deleted discussion in Interrupt Performance section replacing it with reference to application note SWM 640000021 DM5810 DM6810 Driver for Linux Published by RTD Embedded Technologies Inc 103 Innovation Boulevard State College PA 16803 0906 Copyright 2005 by RTD Embedded Technologies Inc All rights reserved Printed in U S A The RTD logo and dataModule are registered trademarks of RTD Embedded Technologies Linux is a registered trademark of Linus Torvalds All other trademarks appearing in this doc ument are the property of their respective owners Wo DMS5810 DM6810 Driver for Linux Table of Contents TABLE OB CONTENTS issie esse soe eres ae ES dee ees Ge ee oge ese NE eo sd es oe ede bed ee deed d INTRODUCTION siese sede seg es ee se Ge og eed ee oe ee ee of beg ee Gee Ge oe ee eo ed see 5 NOTATIONAL CONVENTIONS cssssccss
17. DM6810 IOCTL READ 8 BITS amp ioctl request if status 0 If bit 0 is set then interrupt occurred on port 0 1 if ioctl_request access_8 data amp 0x01 fprintf stdout Digital I O port 0 1 generated an interrupt n DIOIsIrq68 10 bool DIOIsIrq68 10 u_int8_t Port Description Determine whether or not the given digital I O port generated an interrupt NOTE The digital I O ports exist in pairs Ports 0 amp 1 form a pair as do ports 2 amp 3 and ports 4 amp 5 Therefore the interrupt state for a port is indistinguishable from the interrupt state for the other port in the pair NOTE This function examines the contents of the port s Read Port Digital I O Status Register NOTE This function is equivalent to DIOIsIRQ68100 NOTE The information returned by this function is unreliable because the driver s interrupt handler clears all interrupt status flags during interrupt acknowledgement Parameters Port Digital I O port to examine interrupt status of Valid values are 0 Digital VO port 0 1 Digital VO port 1 2 Digital VO port 2 3 Digital I O port 3 4 Digital I O port 4 5 Digital VO port 5 Return Value false No interrupt occurred true An interrupt occurred DM5810 DM6810 Driver for Linux 22 IOCTL Interface dm6810_ioctl_argument_t ioctl request int file descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here
18. Device void Description DM6810Device class destructor Parameters None Return Value None Destructors do not return a value IOCTL Interface None DoneTimer68 10 bool DoneTimer68 1 0 void Description Set each timer counter into rate generator mode and load each with a divisor value of two Parameters None 31 DM5810 DM68 10 Driver for Linux Return Value true Success false Failure Please see the descriptions of ClockMode68100 and ClockDivisor6810 for information on possible values errno may have in this case IOCTL Interface This function makes use of several ioctl requests EnableIRQSharing68 10 bool EnableIRQSharing68 1 0 u_int8_t Enable Description Enable or disable a board s interrupt sharing feature NOTE This function also modifies the library s internal cache of the board s Clear IRQ IRQ Enable Register value NOTE The DM6810 interrupt handler is not designed to process interrupts shared between devices To avoid unpredictable behavior or worse do not share an interrupt between devices NOTE Interrupts do not need to be shared in order to use several interrupt sources on a single board For example if you wish to use both P14 and port 0 digital interrupts on a single DM6810 device then interrupts do not need to be shared Parameters Enable Flag indicating whether or not interrupt sharing should be enabled A value of 0 means disable interrupt sharing
19. Interface This function makes use of several ioctl requests 71000 0 DM5810 DM6810 Driver for Linux DIOClearlrg6810 bool DIOClearIrq68 10 u_int8_t Port Description Clear the Digital IRQ Status bit for the given digital I O port NOTE The digital I O ports exist in pairs Ports 0 amp 1 form a pair as do ports 2 amp 3 and ports 4 amp 5 Therefore clearing the Digital IRQ Status bit for a port also clears the Digital IRQ Status bit for the other port in the pair NOTE There is no need to call this function from an application Interrupts are automatically acknowledged by the driver s interrupt handler Parameters Port Digital I O port to clear IRQ status of Valid values are 0 Digital I O port 0 1 Digital VO port 1 2 Digital VO port 2 3 Digital I O port 3 4 Digital I O port 4 5 Digital VO port 5 Return Value true Success false Failure with errno set as follows EINVAL Port is not valid Please see the description of the internal function select_dio_control_register for information on other possible values errno may have in this case IOCTL Interface This function makes use of several ioctl requests DIOClearStrobe68 10 bool DIOClearStrobe6810 u_int8_t Port Description Clear the Strobe Status bit in the Read Digital I O Status Register for the given digital I O port NOTE The digital I O ports exist in pairs Ports 0 amp 1 form a pair as do ports 2 amp 3 and ports 4
20. L Interface dm6810 ioctl argument t ioctl request int file descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here Write to the IRQ Enable Register at base I O address 16 ff ioctl_request access_8 offset 0x10 3 0000 DM5810 DM6810 Driver for Linux Disable P14 interrupt bit 0 0 and disable IRQ sharing bit 2 1 Sy ioctl request access 8 data 0x04 status ioctl file descriptor DM6810 IOCTL WRITE 8 BITS amp ioctl request GetDriverVersion68 10 bool GetDriverVersion68 10 u_int32_t version p Description Get the driver version number The version number is an unsigned integer encoding the major minor and patch level numbers NOTE The driver version is encoded according to the formula Version MajorVersion lt lt 16 l MinorVersion lt lt 8 l PatchLevelNumber Parameters version_p Address where version number should be stored If this is NULL then no version number is returned This location is unchanged if the function fails Return Value true Success false version_p is NULL Failure Please see the ioctl 2 man page for information on possible values errno may have in this case IOCTL Interface dm6810_ioctl_argument_t ioctl_request int file_descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here ay status ioctl file
21. _descriptor DM6810_IOCTL_GET_DRIVER_VERSION amp ioctl_request DM5810 DM6810 Driver for Linux 34 if status 0 u_int32_t version version ioctl_request version driver_version fprintf stdout Major version Sd n version gt gt 16 amp OxF fprintf stdout Minor version d n version gt gt 8 amp OxF fprintf stdout Patch level d n version amp OxF GetIRQStatus68 10 u_int8_t GetIRQStatus68 10 void Description Get the contents of a board s IRQ Status Register at base I O address 17 NOTE Only bits 0 through 3 are returned NOTE The information returned by this function is unreliable because the driver s interrupt handler clears all interrupt status flags during interrupt acknowledgement Parameters None Return Value IRQ Status Register contents Please see the hardware manual for the interpretation of register bits IOCTL Interface dm6810 ioctl argument t ioctl request int file descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here x Read the IRQ Status Register at base I O address 17 s ioctl_request access_8 offset 0x11 This value does not matter because it is ignored making the request However after ioctl returns the structure member will contain the register contents ioctl_request access_8 data 0 status ioctl file_descriptor DM6
22. a character device major number of 252 when registering the boards and creating the dev entries Instead the driver now asks the kernel to dynamically assign a major number Since this major number may change each time you load the driver the best way to create the device files is to use the command make devices this generates four files in dev named rtd dm68 10 0 through rtd dm68 10 3 Be aware that driver Makefile uses the uname r command to determine which kernel version it is running on It does this to set up separate make rules and variables for the 2 4 and 2 6 kernels which allows one set of targets to work on both kernels Compiling the driver on a development machine which does not run the same kernel version as the production machine that will host your application almost certainly invites trouble If you ever need to unload the driver from the kernel you can use the command make rmmod Building the Library The example programs and your application use the DM6810 library so it must be built before any of these can be compiled To build the library change your current directory to lib and issue the command make The GNU C compiler g is used to compile the library source code To prevent compatibility problems any source code which makes use of library functions should also be built with g The DM6810 library is statically linked and is created in the file librtd dm68 10 a DMS5810 DM6810 Driver for Linux 8
23. aring bit 2 1 SR ioctl request access 8 data 0x05 status ioctl file descriptor DM6810 IOCTL WRITE 8 BITS amp ioctl request SetUserClock6810 float SetUserClock68 10 u_int8_t Timer float InputRate float OutputRate Description Set the given timer counter into rate generator mode and program its divisor value based upon the specified input and output rates Parameters Timer The timer to program Valid values are 0 Timer counter 0 1 Timer counter 1 2 Timer counter 2 InputRate Input clock rate to timer counter OutputRate Desired output rate Return Value Actual clock frequency programmed IOCTL Interface This function makes use of several ioctl requests DM5810 DM6810 Driver for Linux 42 WriteByte6810 bool WriteByte6810 u int8 t offset u int8 t data Description Write an 8 bit value to the given offset within a DM6810 board s VO memory NOTE It is strongly suggested that you use other library functions instead of directly accessing a board s registers Parameters offset Offset within VO memory to write data Data to write Return Value true Success false Failure with errno set as follows EINVAL offset is not valid EOPNOTSUPP offset is valid but it represents a read only register Please see the ioctl 2 man page for information on other possible values errno may have in this case IOCTL Interface dm6810 ioctl argument t ioctl request int file descr
24. e factory for an RMA number THIS LIMITED WARRANTY DOES NOT EXTEND TO ANY PRODUCTS WHICH HAVE BEEN DAMAGED AS A RESULT OF ACCIDENT MISUSE ABUSE such as use of incorrect input voltages improper or insufficient ventilation failure to follow the operating instructions that are provided by RTD Embedded Technologies acts of God or other contingencies beyond the control of RTD Embedded Technologies OR AS A RESULT OF SERVICE OR MODIFICATION BY ANYONE OTHER THAN RTD Embedded Technologies EXCEPT AS EXPRESSLY SET FORTH ABOVE NO OTHER WARRANTIES ARE EXPRESSED OR IMPLIED INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT NESS FOR A PARTICULAR PURPOSE AND RTD Embedded Technologies EXPRESSLY DISCLAIMS ALL WARRANTIES NOT STATED HEREIN ALL IMPLIED WARRANTIES INCLUDING IMPLIED WARRANTIES FOR MECHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE LIMITED TO THE DURATION OF THIS WARRANTY IN THE EVENT THE PRODUCT IS NOT FREE FROM DEFECTS AS WARRANTED ABOVE THE PURCHASER S SOLE REMEDY SHALL BE REPAIR OR REPLACEMENT AS PROVIDED ABOVE UNDER NO CIRCUMSTANCES WILL RTD Embedded Technologies BE LIABLE TO THE PURCHASER OR ANY USER FOR ANY DAMAGES INCLUDING ANY INCIDENTAL OR CONSEQUENTIAL DAMAGES EXPENSES LOST PROFITS LOST SAVINGS OR OTHER DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PRODUCT SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR CONSUMER PRODUCTS AND
25. e given digital I O port generated an interrupt NOTE The digital I O ports exist in pairs Ports 0 amp 1 form a pair as do ports 2 amp 3 and ports 4 amp 5 Therefore the interrupt state for a port is indistinguishable from the interrupt state for the other port in the pair NOTE This function examines the contents of the IRQ Status Register at base I O address 17 NOTE This function is equivalent to DIOIsIrq6810 NOTE The information returned by this function is unreliable because the driver s interrupt handler clears all interrupt status flags during interrupt acknowledgement Parameters Port Digital I O port to examine interrupt status of Valid values are 0 Digital VO port 0 1 Digital I O port 1 2 Digital VO port 2 3 Digital I O port 3 4 Digital I O port 4 5 Digital VO port 5 Return Value false No interrupt occurred true An interrupt occurred IOCTL Interface dm6810_ioctl_argument_t ioctl_request int file_descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here sy Read the IRQ Status Register at base I O address 17 Eye ioctl_request access_8 offset 0x11 a DM5810 DM6810 Driver for Linux This value does not matter because it is ignored making the request However after ioctl returns the structure member will contain the register contents By ioctl request access 8 data 0 status ioctl file descriptor
26. eed to call this function from an application Interrupts are automatically acknowledged by the driver s interrupt handler Parameters None Return Value None IOCTL Interface dm6810_ioctl_argument_t ioctl_request int file_descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here 7 Read the Clear IRQ Register at base I O address 16 a ioctl_request access_8 offset 0x10 This value does not matter because it is ignored making the request auf ioctl_request access_8 data 0 status ioctl file_descriptor DM6810_IOCTL_READ_8 BITS amp ioctl_request ClockDivisor6810 bool ClockDivisor68 10 u_int8_t Timer u_int16_t Divisor Description Set the divisor for the given 8254 timer counter NOTE Before calling this function you must ensure that the indicated timer counter is set to be programmed least significant byte first then most significant byte DM5810 DM6810 Driver for Linux 14 Parameters Timer The timer to operate on Valid values are 0 Timer counter 0 1 Timer counter 1 2 Timer counter 2 Divisor Counter divisor Valid values are 0 through 65535 Return Value true Success false Failure with errno set as follows EINVAL Timer is not valid Please see the description of the internal function outb for information on other possible values errno may have in this case IOCTL Interface This function makes
27. erefore changing the digital interrupt source for a port will overwrite any digital interrupt source set for the other port in the pair Parameters Port Port to set digital interrupt source for Valid values are 0 Digital VO port 0 1 Digital VO port 1 2 Digital VO port 2 3 Digital I O port 3 4 Digital I O port 4 5 Digital VO port 5 Bit The bit which generates a digital interrupt Valid values are 0 BitO 1 Bitl 2 Bit2 3 Bit3 4 Bit4 5 Bit5 6 Bit6 7 Bit7 Return Value true Success false Failure with errno set as follows EINVAL Port is not valid EINVAL Bit is not valid 2 0 0 0 0 DM5810 DM6810 Driver for Linux Please see the description of the internal functions outb and select dio control register for information on other possible values errno may have in this case IOCTL Interface This function makes use of several ioctl requests DIOSetPortDirection6810 bool DIOSetPortDirection6810 u int8 t Port u_int8_t Direction Description Set the direction input or output for the bits in the given digital VO port Parameters Port Port to set bit direction for Valid values are 0 Digital I O port 0 1 Digital I O port 1 2 Digital I O port 2 3 Digital VO port 3 4 Digital I O port 4 5 Digital I O port 5 Direction Bit mask which controls bit direction A zero in a bit position means the corresponding port bit is set to input A one in a bit position means the corresponding port bit is set
28. escriptor int status Before calling ioctl file_descriptor must be set up This is not shown here Ef Read the Port 4 5 Digital I O Status Register at base I O address 11 EJ ioctl_request access_8 offset 0x0B This value does not matter because it is ignored making the request However after ioctl returns the structure member will contain the register contents Er ioctl request access 8 data 0 status ioctl file descriptor DM6810 IOCTL READ 8 BITS amp ioctl request if status 0 If bit 6 is set then data strobe occurred on port 4 EJ if ioctl_request access_8 data amp 0x40 fprintf stdout Data strobed into digital I O port 4 n DIORead68 10 u_int8_t DIORead6810 u int8 t Port Description Read an 8 bit value from the given digital I O port Parameters Port The port to read from Value values are 0 Digital I O port 0 1 Digital I O port 1 2 Digital I O port 2 3 Digital VO port 3 4 Digital I O port 4 5 Digital I O port 5 DMS5810 DM6810 Driver for Linux 24 Return Value 8 bit value from specified digital I O port IOCTL Interface dm6810 ioctl argument t ioctl request int file descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here Read the Digital I O Port 1 Register at base I O address 1 E ioctl_request access_8 offset 0x01 This
29. everal ioctl requests DIOSelectRegister68 10 bool DIOSelectRegister68 10 u_int8_t Port u_int8_t Select Description Select which control register is accessed for the given digital I O port NOTE This function is not normally required in an application The other library functions which require digital I O control register access select that register internally Parameters Port The port to select control register for Value values are 0 Digital I O port 0 1 Digital I O port 1 2 Digital I O port 2 3 Digital VO port 3 4 Digital I O port 4 5 Digital I O port 5 Select Control register to access Valid values are O Clear Register 1 Even numbered Port Direction Register 2 Odd numbered Port Direction Register 3 IRQ Source Register Return Value true Success false Failure with errno set as follows EINVAL Port is not valid EINVAL Select is not valid DMS5810 DM6810 Driver for Linux 26 Please see the description of the internal function select dio control register for information on other possible values errno may have in this case IOCTL Interface This function makes use of several ioctl requests DIOSetIROSource6810 bool DIOSetIROSource6810 u int8 t Port u int8 t Bit Description Set which bit generates a digital interrupt for the given digital I O port NOTE The digital I O ports exist in pairs Ports 0 amp 1 form a pair as do ports 2 amp 3 and ports 4 amp 5 Th
30. ext represents something which depends upon choices you have made or upon your specific system configuration DMS5810 DM68 10 Driver for Linux 6 Installation Instructions Extracting the Software All software comes packaged in a gzip d tar file named dm6810 Linux v2 0 x tar gz First decide where you would like to place the software Next change your current directory to the directory in which you have chosen to install the software by issuing the command cd lt installation path gt Then extract the software by issuing the tar xvzf lt path to tar file gt dm68 10_Linux_v2 0 x tar gz command this will create a directory dm6810 Linux v2 0 x that contains all files comprising the software package Contents of Installation Directory Once the tar file is extracted you should see the following files and directories within dm6810_Linux_v2 0 x driver examples include lib CHANGES TXT LICENSE TXT README TXT The file CHANGES TXT describes the changes made to the software for this release as well as for previous releases The file LICENSE TXT provides details about the RTD end user license agreement which must be agreed to and accepted before using this software The file README TXT contains a general overview of the software and contact information should you experience problems have questions or need information The directory driver contains the source code and Makefile for the drivers The directory exam
31. fore to meet your requirements you must rewrite the interrupt handler A detailed description of writing interrupt handlers lies beyond the scope of this document What follows is pseudo code for an interrupt handler which implements the desired behavior interrupt_handler Determine interrupt status As read IRQ Status Register at offset 0x11 if bit 0 is not set in register then Spurious interrupt r exit end if Acknowledge the interrupt This consists of two steps 1 writing the appropriate value to the Port 0 1 Program Digital Mode Register to select clear mode access to Port 0 1 Clear IRQ Register and 2 reading Port 0 1 Clear IRQ Register to acknowledge and clear the interrupt write to Port 0 1 Program Digital Mode Register at offset 0x03 read Port 0 1 Clear IRQ Register at offset 0x02 Read value on digital I O port 2 A read Digital I O Port 2 Register at offset 0x04 Write 0x01 to digital I O port 5 ay write 0x01 to Digital I O port 5 Register at offset 0x09 DM5810 DM6810 Driver for Linux 10 Using the API Functions DM6810 hardware and the associated driver functionality can be accessed through the library API Application Programming Interface functions Applications wishing to use library functions must include the include dm6810 library h header file and be statically linked with the lib librtd dm6810 a library file Because of changes made in driver
32. ild the driver code This will create the driver object file which is named rtd dm68 10 0 on 2 4 kernels and rtd dm6810 ko on 2 6 kernels Before the driver can be used it must be loaded into the currently running kernel Using the command make insmod will load the DM6810 driver into the kernel This target assumes that A single DM6810 is installed The board s base I O address is set to the factory default of 0x300 The DM6810 is jumpered to use IRQ 5 If the previous assumptions do not match your hardware setup you will need to edit the Makefile and change this rule to reflect your board configuration or manually issue an appropriate insmod command For the 2 4 kernel when you load the kernel driver the message Warning loading rtd dm68 10 0 will taint the kernel non GPL license Proprietary will be printed on your screen You can safely ignore this message since it pertains to GNU General Public License GPL licensing issues rather than to driver operation For the 2 6 kernel when you load the kernel driver no warnings will appear on your screen However the warning module license Proprietary taints kernel will be written to the system log when the module is loaded You can safely ignore this message since it pertains to GNU General Public License GPL licensing issues rather than to driver operation The final step is to create dev entries for the hardware Versions of the driver prior to 2 0 0 always assumed
33. ion makes use of several ioctl requests DIOWrite63 10 bool DIOWrite6810 u_int8_t Port u_int8_t Data Description Write an 8 bit value to the given digital I O port 2 0 0 0 0 0 BM5810 DM6810 Driver for Linux Parameters Port The port to write to Value values are 0 Digital I O port 0 1 Digital I O port 1 2 Digital I O port 2 3 Digital VO port 3 4 Digital I O port 4 5 Digital I O port 5 Data Data to write Valid values are 0 through 255 Return Value true Success false Failure with errno set as follows EINVAL Port is not valid Please see the description of the internal function outb for information on other possible values errno may have in this case IOCTL Interface dm6810_ioctl_argument_t ioctl_request int file_descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here sy Write to the Digital I O Port 3 Register at base I O address 5 a ioctl_request access_8 offset 0x05 Write a value with bits 4 through 7 set to one EL ioctl request access 8 data OxF0 status ioctl file descriptor DM6810 IOCTL WRITE 8 BITS amp ioctl request DM6810Device DM6810Device void Description DM6810Device class constructor DM5810 DM6810 Driver for Linux 30 Parameters None Return Value None Constructors do not retum a value IOCTL Interface None DM6810Device DM6810
34. iptor int status Before calling ioctl file_descriptor must be set up This is not shown here xy Write to the Digital I O Port 1 Register at base I O address 1 f ioctl_request access_8 offset 0x01 Write all zeros to the port a ioctl_request access_8 data 0x00 status ioctl file_descriptor DM6810_IOCTL_WRITE_8_BITS amp ioctl_request 43 DM5810 DM6810 Driver for Linux Example Programs Reference interrupt wait Demonstrates waiting for interrupt notification Demonstrates how to set up data strobing timer interrupts Demonstrates generating P14 interrupts via timer counter 2 event count modes functions DM5810 DM6810 Driver for Linux 44 Limited Warranty 45 RTD Embedded Technologies Inc warrants the hardware and software products it manufactures and produces to be free from defects in materials and workmanship for one year following the date of shipment from RTD Embedded Technologies INC This warranty is limited to the original purchaser of product and is not transferable During the one year warranty period RTD Embedded Technologies will repair or replace at its option any defective products or parts at no additional charge provided that the product is returned shipping prepaid to RTD Embedded Technologies All replaced parts and products become the property of RTD Embedded Technologies Before returning any product for repair customers are required to contact th
35. not to wait for an interrupt to occur before returning status A value of false means return the most recent interrupt status without waiting A value of true means wait for an interrupt to occur and then return status Return Value true Success false Failure with errno set as follows EINTR The process received a signal before an interrupt occurred Please see the ioctl 2 man page for information on other possible values errno may have in this case DMS5810 DM68 10 Driver for Linux 36 IOCTL Interface dm6810 ioctl argument t ioctl request int file descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here R Wait in the kernel until the next interrupt occurs before returning status od ioctl reguest last int status wait for interrupt OxFF These values do not matter because they are ignored making the request However after ioctl returns the structure members will contain the requested information XY ioctl request last int status status reg 0 ioctl request last int status int count 0 status ioctl file descriptor DM6810 IOCTL GET LAST INT STATUS amp ioctl request if status 0 fprintf stdout Status at last interrupt n fprintf stdout IRQ Status O0x x n ioctl_request last_int_status status_reg fprintf stdout interrupts Sd n ioctl_request last_int_status int_count
36. ples holds the source code and Makefile for the example programs The directory include contains all header files used by the driver example programs library and your application programs Library source code and Makefile reside in the directory lib Building the Driver Driver source code uses files located in the kernel source tree Therefore you must have the full kernel source tree available in order to build the driver The kernel source tree consumes a lot of disk space on the order of 100 to 200 megabytes Because production systems rarely contain this much disk space you will probably use a development machine to compile the driver source code The development system which provides a full compilation environment must be running the exact same version of the kernel as your production machine s otherwise the kernel module may not load or may load improperly After the code is built you can then move the resulting object files libraries and executables to the production system s Building the driver consists of several steps 1 compiling the source code 2 loading the resulting kernel module into the kernel and 3 creating hardware device files in the dev directory To perform any of the above steps you must change your current directory to driver The file Makefile contains rules to assist you 7 DM5810 DM6810 Driver for Linux To compile the source code issue the command make The GNU C compiler gcc is used to bu
37. r Linux DIOEnablelrg6810 bool DIOEnableIrq68 10 u_int8_t Port bool Enable Description Enable or disable digital interrupts for the given digital I O port NOTE The digital I O ports exist in pairs Ports 0 amp 1 form a pair as do ports 2 amp 3 and ports 4 amp 5 Therefore changing the digital interrupt state for a port also changes the digital interrupt state for the other port in the pair NOTE If you are using digital interrupts make sure data strobing is disabled for the port s which will generate the interrupts Having data strobe enabled for a port disables digital interrupts for that port Parameters Port Digital I O port to modify interrupt state for Valid values are 0 Digital VO port 0 1 Digital VO port 1 2 Digital VO port 2 3 Digital VO port 3 4 Digital I O port 4 5 Digital VO port 5 Enable Flag indicating whether or not digital interrupts should be enabled A value of true means enable digital interrupts A value of false means disable digital interrupts Return Value true Success false Failure with errno set as follows EINVAL Port is not valid Please see the description of the internal function outb for information on other possible values errno may have in this case IOCTL Interface This function makes use of several ioctl requests DM5810 DM6810 Driver for Linux 20 DIOIsIRQ68 10 bool DIOIsIRQ6810 u_int8_t Port Description Determine whether or not th
38. scriptor DM6810_IOCTL_READ_8 BITS amp ioctl_request ReadTimerCounter68 10 u int16 t ReadTimerCounter68 10 u_int8_t Timer Description Read the count for the given timer counter Parameters Timer The timer to operate on Valid values are 0 Timer counter 0 1 Timer counter 1 2 Timer counter 2 Return Value 16 bit counter value IOCTL Interface This function makes use of several ioctl requests SetP14IRQPolarity68 10 bool SetP14IRQPolarity68 10 u_int8_t Polarity Description Control whether P14 interrupts occur on rising or falling edge of pulse NOTE This function also modifies the library s internal cache of the board s Clear IRQ IRQ Enable Register value Parameters Polarity Selects pulse edge which triggers an interrupt A value of 0 means rising edge Any other value means falling edge Return Value true Success false Failure Please see the description of the internal function outb for information on possible values errno may have in this case 41 DM5810 DM68 10 Driver for Linux IOCTL Interface dm6810_ioctl_argument_t ioctl_request int file_descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here PY Write to the IRQ Enable Register at base I O address 16 ef ioctl_request access_8 offset 0x10 Enable P14 interrupt bit 0 1 set IRQ polarity to positive edge bit 1 0 and disable IRQ sh
39. sssccessssccssssscccssscccessscccssssscsessssccessssccesssssesesssccsceees 6 INSTALLATION INSTRUCTION cccccccsssssssscccssssssssscsocessssssscsssccesssssssccssccessssssssecsccessseees 7 EXTRACTING THE SORT WARE 3 SE ee a See Ee ee ese de ba cae Geb Ee eg ean crete Bee ee 7 CONTENTS OF INSTALLATION DIRECTORY ees esse esse ese esse ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee 7 BUIEDING THE DRIVER SE ed es ee dus Bees bee SE ee desea a ed ee ee eg ee ee a ede ees ne ee Senco 7 BUILDING THE LIBRARY esse sees sees ee ese sesse ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee 8 BUILDING THE EXAMPLE PROGRAMS eise sesse see ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee dee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee 9 INTERRUPT PERFORMANCE ccccccssssssssssssccscccsccsssssscsccccessscsssscccccesssssssccccccessssssscscsccoees 10 PERFORMANCE ISSUES er Ses ies oo ee de be Beek oe ee abet te Gee ek oe eg eg ee ek De ge ek gek ge EE 10 REWRITING THE INTERRUPT HANDLER ees esse ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee dee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee 10 USING THE API FUNCTIONS iicccceccsccesteccoccvescodcevescconevessesvenveccocesesssacocescceversuseacecdecsesevedecdseneee 11 FUNCTION REFERENCE iese siese dese see eg dee oe ese ge oge Gede oe ee Gee dee ee ese Doe gees
40. uest access_8 data 0x30 Operate on timer counter 1 id ioctl_request access_8 offset 0x40 Put timer in rate generator mode sy ioctl_request access_8 offset 0x04 status ioctl file_descriptor DM6810_IOCTL_WRITE_8_BITS amp ioctl_request CloseBoard68 10 bool CloseBoard68 1 0 void Description Close a DM6810 device file DMS5810 DM68 10 Driver for Linux 16 Parameters None Return Value true Success false Failure Please see the close 2 man page for information on possible values errno may have in this case IOCTL Interface None DIOClearChip68 10 bool DIOClearChip68 1 0 u_int8_t Port Description Clear the digital I O chip for the given digital I O port NOTE The digital I O ports exist in pairs Ports 0 amp 1 form a pair as do ports 2 amp 3 and ports 4 amp 5 Therefore clearing the digital I O chip for a port also clears the digital I O chip for the other port in the pair Parameters Port Digital I O port for which to clear chip Valid values are 0 Digital VO port 0 1 Digital VO port 1 2 Digital VO port 2 3 Digital I O port 3 4 Digital I O port 4 5 Digital VO port 5 Return Value true Success false Failure with errno set as follows EINVAL Port is not valid Please see the descriptions of the internal functions outb and select_dio_control_register for information on other possible values errno may have in this case IOCTL
41. use of several ioctl requests ClockMode68 10 bool ClockMode6810 u_int8_t Timer u_int8_t Mode Description Set the mode for the given 8254 timer counter NOTE This function puts the indicated timer counter into binary mode NOTE This function sets the timer counter to read load least significant byte first then most significant byte Parameters Timer The timer to operate on Valid values are 0 Timer counter 0 1 _Timer counter 1 2 Timer counter 2 Mode The counter mode to set Valid values are Event count Programmable one shot Rate generator Square wave rate generator Software triggered strobe Hardware triggered strobe nAnBWNrR CO 5B BM5810 DM6810 Driver for Linux Return Value true Success false Failure with errno set as follows EINVAL Timer is not valid EINVAL Mode is not valid Please see the description of the internal function outb for information on other possible values errno may have in this case IOCTL Interface dm6810_ioctl_argument_t ioctl_request int file_descriptor int status Before calling ioctl file_descriptor must be set up This is not shown here Write to the 8254 Timer Counter Control Word Register at base I O address 15 E ioctl_request access_8 offset Ox0F Set timer to read load least significant byte first then most significant byte Because bit 0 is set to zero this puts the timer in binary mode ef ioctl_req

Download Pdf Manuals

image

Related Search

Related Contents

USER MANUAL MODEL 455 PID OPTION  Guide de l`ufilisateur  STEMS for HS - StuHasic.com  Unidade de Disco Rígido Serial ATA: Guia do Usuário - ps  総合カタログ  Husqvarna T300 User's Manual  Customer Acceptance    Asrock FM2A88X+ BTC motherboard  DIGITAL CAMERA 使用説明書/ソフトウェア取扱ガイド  

Copyright © All rights reserved.
Failed to retrieve file