AMC 68VZ328 software manual

Page 70

DIMM_IO_IOCTL_MAP will return an offset given a port and bit number. The bit and port number must be assigned to port_number and bit_number in the dimm_io struc- ture that is passed to the ioctl command. The offset will be assigned to the offset field of the structure if the port and bit number exists in the list of active I/O points, otherwise an error is returned.

DIMM_IO_IOCTL_RETRIEVE returns a port and bit number given an offset. The offset must be assigned to the dimm_io structure passed to the ioctl call. As long as the offset is smaller than the maximum number of active pins, the port and bit numbers in the structure will be set. If the offset does not correspond to an active I/O point, then an error will be returned.

DIMM_IO_IOCTL_SET_CONFIG_BY_OFFSET will set the necessary registers to con- figure the I/O point specified by the offset. Thus, the fields for offset, mode, and pull_up_dn must be set. After the function call, the pin will be configured according to those settings, and the device driver will fill in the corresponding port_number and bit_number in the structure.

DIMM_IO_IOCTL_SET_CONFIG_BY_PORT_BIT will also configure the I/O point, but as specified by the port and bit number in the dimm_io structure. Similar to the configuration by offset, the mode, and pull_up_dn must be set. After returning suc- cessfully from the ioctl call, the offset for the port and bit number will also be set.

DIMM_IO_IOCTL_GET_CONFIG_BY_OFFSET will retrieve the configuration of the I/ O point specified by the offset. After successful execution, the fields port_number, bit_number, mode, and pull_up_dn will be set with their appropriate information.

DIMM_IO_IOCTL_GET_CONFIG_BY_PORT_BIT will get the settings of the I/O point specified by the port_number and bit_number. Upon returning from the ioctl call, the offset, mode, and pull_up_dn will reflect the hardware settings.

70

www.amctechcorp.com

Image 70
Contents DimmPCITM 68VZ328 Hardware / Software Manual Contact Information Copyright noticeDimmPCITM Software Development Kit NETdimm Developers Kit Quick Start Guide Etc/issue Page This page left intentionally blank Introduction Launching Linux at the embeddedPage What’s on the CD? System RequirementsThis page left intentionally blank CPU Module FeaturesUC68VZ328 Embedded Microcontroller BackplaneGeneral Description CPU Module DescriptionBackplane Description Architecture CPU ArchitectureSystem Memory MCU CoreMemory Map Memory Memory MapLayout of the Flash and Flash Schematic Layout of the Flash Sdram Ethernet Controller Viewing the Ethernet MAC IDNETdimm Ethernet Schematic Digital I/O IOdimmDigital Output Schematic Analog Output Schematic Analog Input Schematic Digital to Analog Converter Schematic Watchdog RS-232Highlights Usage LCD Schematic LCD InterfaceDimmPCITM Signal Descriptions DimmPCITM signals for System SlotPCI Electrical Characteristics Maximum RatingsThis page left intentionally blank Builder Kit Installing the dimmPCI TM SystemInstallation Before beginningConfiguring and compiling the µClinux kernel Creating a ROM image Customizing the filesystemAccessing your dimmPCI development board via the serial port Static IP Accessing the NetworkDynamic IP Accessing your dimmPCI development board via telnet Compiling your own source codeUsing NFS to streamline the development cycle Home directory/dimmpci/source Updating Applications on your dimmPCI module MethodThis page left intentionally blank Programming the uC68VZ328 LoaderOops Cd /opt/boottools/oops Oops -p /dev/ttyS0 -k kernel.bin Page Page This page left intentionally blank Appendix Sample CodeClose the file afterwards fclose filehandle Page Longwatchdogid #include unistd.h #include stdio.h int main void This page left intentionally blank Journalling Flash File System Umount /usr Sbin/mkjffs /dev/flash0 Page This page left intentionally blank Development Tool Chains Normal Usage of the PIC-COFFTool Chain Page This page left intentionally blank D1 Application Note IntroductionKernel and Filesystem Configuration Kernel and Filesystem Configuration Flow Chart YESAvailable Digital I/O Pins List of all available digital I/O pins Programming Structure Dimmio structure descriptionDigital I/O Functions Page Sample Programs In0 In1 In2 In3 In4 In5 In6 In7 Out0 Even ParityMknod io1 c 123 Page This page left intentionally blank D2 Application Note AbstractKernel Configuration RequirementsAgain, from the main menu under Network device support Kernel Configuration Flow Chart AtCommandPrompt Filesystem Configuration Cd /opt/filesystem name make clean Make Filesystem Configuration Flow Chart Modifications to ‘rc’ fileHost machine Configuration TestingPage This page left intentionally blank Using Multiple NETdimm Modules Application NoteSimple Server & Client Inetd based Server & ClientPage This page left intentionally blank Using Analog and Digital I/O with IOdimmCd /opt Cp -Rpdx newfs iodimmmfs ADC MAX1203 Available I/O Pins Category Channel Backplane System Backplane Header Slot PinFunctions Digital Inputs and Outputs+ Κ Iodimm/dio Samples/cardspecific/iodimm/dio Page This page left intentionally blank Using Oops Purpose & basic format of files for oopsUpload & Flash Upload & Run DownloadCommon oops program arguments Appendix This page left intentionally blank 104 DimmPCITM Software Development Kit Distribution Licensing, Copyrights & LiabilityPreamble 106 107 108 109 No Warranty Appendix How to Apply These Terms to Your New Programs111 112 113 This page left intentionally blank 114 References/ Suggested Reading