⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 changes.txt

📁 rt 6430 采集卡 linux下驱动源代码
💻 TXT
字号:
Change log for SWP-700010033 rev ADM6430 driver, library, and example programs for Linux.Copyright 2004 RTD Embedded Technologies, Inc.  All Rights Reserved.v2.0 (rev A)	3/31/04		RWB------------------------------------ Used the existing dm6430hr-1.0.tar.gz, dm6430hrcmd-1.0.tar.gz, and  dm6430hrlib-1.0.tar.gz tar files as the beginning point for the reorganized  driver package- From dm6430hr-1.0.tar.gz, extracted the file Dm6430hrDevice.c, renamed it to  rtd-dm6430.c, and moved it into driver/- Created driver/Makefile to build the driver without using the configure  shell script; the make file borrows the command line options, etc. from the  one which configure generated- From dm6430hr-1.0.tar.gz, extracted the file Dm6430hrDevice.h, renamed it to  dm6430driver.h, and moved it into include/- From dm6430hr-1.0.tar.gz, extracted the file rtd/DM6430ioctl.h, renamed it to  dm6430ioctl.h, and moved it into include/- Fixed indentation (or lack thereof) in rtd-dm6430.c to improve readability- In driver/rtd-dm6430.c, changed DRIVER_NAME to rtd-dm6430- In driver/rtd-dm6420.c, changed PROJECT_RELEASE to 2.0- In driver/rtd-dm6430.c, removed the text HR from DRIVER_DESCRIPTION string- In driver/rtd-dm6430.c, renamed AUTHOR to DRIVER_COPYRIGHT and changed it  recommended RTD copyright- In driver/rtd-dm6430.c, removed SUPPORTED_DEVICE- Changed driver to dynamically allocate character device major number- In driver/rtd-dm6430.c, changed definitions of dm_inb_p(), dm_inw_p(),  dm_outb_p(), and dm_outw_p() to properly declare function parameters- In driver/rtd-dm6430.c, restructured dm6430hr_register_device() to remove  goto statements- In driver/rtd-dm6430.c, created function validate_irq() to validate an IRQ  passed in from init_module()- In driver/rtd-dm6430.c, created function validate_dma_channel() to validate  a DMA channel passed in from init_module()- In driver/rtd-dm6430.c, restructured init_module() to remove goto statements  and to perform as much data validation as possible before allocating IRQ,  DMA, and character device resources- Created examples/Makefile to build the example program without using the  configure shell script; the make file borrows the command line options, etc.  from the one which configure generated- From dm6430hrlib-1.0.tar.gz, extracted the file DM6430Lib.c, renamed it to  librtd-dm6430.c, and moved it into lib/- From dm6430hrlib-1.0.tar.gz, extracted the file rtd/DM6430Lib.h, renamed it  to dm6430lib.h, and moved it into include/- Created lib/Makefile to build the library without using the configure shell  script; the make file borrows the command line options, etc.  from the one  which configure generated- Moved all inline functions out of include/dm6430lib.h and placed them in  lib/librtd-dm6430.c- Fixed indentation (or lack thereof) in librtd-dm6430.c to improve readability- Corrected bug in CloseBoard6430() library function so that it returns a  nonzero value if it fails; it was returning nonzero if close(2) succeeded- In include/dm6430lib.h, added documentation of each public function- Added error checking to each public and private library function- Standardized library function status return value on failure to -1- Added code to init_module() driver function to return ENODEV if no addresses  were specified using "io=" on insmod command- Corrected library function DIOIsChipIrq6430() to look at bit 6 in Digital  IRQ/Strobe Status Register instead of bit 7; bit 7 is Strobe Status whereas  bit 6 is Digital IRQ Status- Corrected library function ReadChannelGainDataStore6430() to read A/D FIFO  only once and not read Status Register to see if channel/gain data store is  enabled; the hardware cannot tell you if the channel/gain data store is  enabled, rather the application must remember that state- Created library function DIOIsChipStrobe6430() to check whether or not data  was strobed into digital I/O port 0- Certain library functions accept a "flag" argument which is shifted and  written to a board register to enable or disable some functionality;  depending upon the value passed in, these functions may have the opposite  of the intended effect so these routines were modified such that this  behavior no longer occurs- Changed EnableTables6430() library function to return EOPNOTSUPP if the  digital table is enabled but the A/D table is disabled; according to the  hardware manual, one cannot enable the digital table without also enabling  the A/D table- Transformed LoadADTable6430() to return EINVAL if the ADEntries parameter is  0 or greater than 1024- Modified LoadDigitalTable6430() to return EINVAL if the entries parameter is  0 or greater than 1024- Changed SetStartTrigger6430() to return EOPNOTSUPP if one of the reserved  bit patterns is passed in as the Start_Trigger parameter- In include/dm6430ioctl.h, corrected typographical error by replacing  DM6430_CL_CLEAL_GAIN with DM6430_CL_CLEAR_GAIN- Created example program dm6430-test-lib-errors to exercise the driver and  library error checking code- Altered the way the driver performs streaming reads by 1) adding  stream_buff_p member to Dm6430hrDevice structure, 2) allocating 2048 bytes  for stream_buff_p in dm6430hr_register_device(), 3) deleting stream_buff_p  in dm6430hr_unregister_device(), 4) adding code in  DM6430HR_IOCTL_DMA_GETINC_Handler() to allow no more than 1024 data items to  be read, and 5) changing DM6430HR_IOCTL_DMA_GETINC_Handler() to perform I/O  into buffer pointed to by stream_buff_p and then copying the data into the  user buffer- In include/dm6430ioctl.h and include/dm6430lib.h, corrected typographical  error by replacing DM6430HR_BIRST_TRIG to DM6430HR_BURST_TRIG- In include/dm6430ioctl.h, corrected typographical error by replacing  DM6430HR_PACER_CKL_INTERNAL with DM6430HR_PACER_CLK_INTERNAL- In include/dm6430ioctl.h, corrected typographical error by replacing  DM6430HR_PACER_CKL_EXTERNAL with DM6430HR_PACER_CLK_EXTERNAL- Created driver function validate_interrupt_circuit() to validate interrupt  circuit number passed in from user space- Added call to validate_interrupt_circuit() in  DM6430HR_IOCTL_IRQ_ENABLE_Handler()- Created driver function validate_dma_circuit() to validate DMA circuit number  passed in from user space- Added call to validate_dma_circuit() in DM6430HR_IOCTL_DMA_INSTALL_Handler()- Added call to validate_dma_circuit() in DM6430HR_IOCTL_DMA_GETDATA_Handler()- Added call to validate_dma_circuit() in DM6430HR_IOCTL_DMA_START_Handler()- Added call to validate_dma_circuit() in DM6430HR_IOCTL_DMA_STOP_Handler()- Added new error checking to DM6430HR_IOCTL_DMA_GETINC_Handler():  1) validate the register the read will be done on, 2) validate the type/size  of transfer, and 3) verify that register size agrees with transfer type/size- Created private library function validate_clock_select() to validate "clock  select" type passed in to some library functions- Added call to validate_clock_select() in SelectTimerCounter6430()- Added code to SetChannelGain6430() to validate A/D channel number, A/D gain,  and single ended/differential mode- Added code to SetConversionSelect6430() to validate A/D conversion control- Added code to SetStartTrigger6430() to validate the pacer clock starter- Added code to SetStopTrigger6430() to validate the pacer clock stopper- Added code to SetPacerClockSource6430() to validate the pacer clock source- Added code to SetBurstTrigger6430() to validate the burst trigger source- Added code to SetTriggerPolarity6430() to validate the external pacer clock  edge- Added code to SetTriggerRepeat6430() to validate A/D conversion cycle repeat  control- Created private library function validate_interrupt_source() to validate  source of interrupt passed in to some library functions- Added call to validate_interrupt_source() in SetIRQ0Source6430()- Added call to validate_interrupt_source() in SetIRQ1Source6430()- Added code to ConfigDINClock6430() to validate digital input FIFO clock  source- Created driver function validate_interrupt_circuit() to validate interrupt  circuit number passed in from user space- Added call to validate_interrupt_circuit() in  DM6430HR_IOCTL_IRQ_INSTALL_Handler()- Created private library function validate_clock_timer() to validate a  clock/timer passed in to some library functions- Added call to validate_clock_timer() in ClockMode6430()- Added code to ClockMode6430() to validate clock mode- Added call to validate_clock_timer() in ClockDivisor6430()- Added call to validate_clock_timer() in SetUserClock6430()- Added call to validate_clock_timer() in ReadTimerCounter6430()- Added call to validate_clock_select() in ReadTimerCounter6430()- Added code to DIOSelectRegister6430() to validate register mode- Created private library function validate_dio_port() to validate a digital  I/O port number passed in to some library functions- Added call to validate_dio_port() in DIORead6430()- Added call to validate_clock_select() in DIOSelectClock6430()- Added code to DIOSelectIrqMode6430() to validate the digital interrupt mode- Added call to validate_dio_port() in DIOWrite6430()- Created library function DIOReadStatus6430() to read the Digital IRQ/Strobe  Status Register- Created the library function DIOIsChipSystemClock6430() to query which clock  is driving digital I/O- Created library function DIOIsChipIRQEnabled6430() to query status of digital  interrupts- Created library function DIOIsChipIRQEventMode6430() to query mode of digital  interrupts- Created library function DIOIsChipPort1Output6430() to query direction of  digital I/O port 1- Created example program dm6430-digital-interrupt to demonstrate how digital  interrupts are used- Created README.TXT to provide an overview of the software- Modified SetPacerClock6430() to add a "double *" parameter and to return an  int- Modified SetBurstClock6430() to add a "double *" parameter and to return an  int- Modified SetuserClock6430() to add a "double *" parameter and to return anxi  int- From dm6430hrcmd-1.0.tar.gz, extracted the file DM6430HRcmd.c, fixed up code  indentation to improve readability, and carved the source file into the  following example programs [thus making them smaller, easier to understand,  and focused on a single task]: 1) dm6430-auto-burst, 2) dm6430-auto-scan,  3) dm6430-dac, 4) dm6430-digital-io, 5) dm6430-dma, 6) dm6430-dual-dma,  7) dm6430-multi-burst, 8) dm6430-sample-counter, 9) dm6430-soft-trigger,  10) dm6430-speed-test, 11) dm6430-stream, 12) dm6430-timers, and  13) dm6430-user-timer- Added code to DM6430HR_Initdev() driver function to clear out irq_count[]  array- Made the inb6430(), outb6430(), moutb6430(), inw6430(), outw6430(), and  moutw6430() library functions private- When lib/Makefile was created, did not carry over building of the shared  library- Corrected a bug in SetStartTrigger6430() library function; the third argument  to the moutw6430() call [which is a mask to indicate which register bits  should not be disturbed] was being passed in as 0xFFF3 but should be 0xFFE3;  0xFFF3 allows only bits 2 and 3 in the Trigger Mode Register to be changed  whereas 0xFFE3 allows bits 2 through 4 in the register to be changed to the  3-bit pacer clock start source- Removed library function IsIRQ06430() because the Status Register bit it  examines is reset by the interrupt handler, thus the routine returns useless  information- Removed library function IsIRQ16430() because the Status Register bit it  examines is reset by the interrupt handler, thus the routine returns useless  information- Changed type of second parameter in LoadDigitalTable6430() from int to  u_int16_t- In driver/Makefile, commented out -DDEBUG on DEBUG_FLAGS line so that extra  debugging code is not compiled into the driver- In lib/Makefile, commented out -g on DEBUG_FLAGS line so that gcc does not  generate debugging information for library code- Added documentation of structures, variables, etc. to include/dm6430driver.h- Added documentation of structures, variables, etc. to include/dm6430ioctl.h- Created library function LoadDAC26430() to write a value to second D/A  converter- Added prototype and documentation for LoadDAC26430() in include/dm6430lib.h

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -