AMC 68VZ328 software manual Programming Structure, Dimmio structure description

Models: 68VZ328

1 115
Download 115 pages 46.92 Kb
Page 68
Image 68

Programming Structure

The structure that should be used to store pin configuration and information is dimm_io from dimmio.h, located in /opt/uClinux/linux/include/linux/. Table 2 below describes the six fields of the structure and their settings.

Table 2: dimm_io structure description

Field

Description

 

 

 

type - short

port_number

The port number corresponds to the ports of

the MC68VZ328, where A = 0, B = 1, C =

 

 

2, … L = 11, M = 12

 

 

 

type - short

bit_number

The bit numbers are for each port, where 0 =

 

lsb, … 7 = msb

 

 

 

type - long

offset

This is the offset into the list of active pins.

 

The offset has a maximum range of 0 to 26.

 

 

 

type - unsigned char

mode

The mode determines the direction of the I/O

 

point, where 0 = input, 1 = output

 

 

 

type - unsigned char

 

The state describes the logic level on the pin,

state

where 0 = low, 1 = highNote that the state

field is not updated when an ioctl call is used

 

 

and field exists only for programming

 

convenience.

 

 

 

type - unsigned char

pull_up_dn

The pull_up_dn controls the pull-up orpull-

down register for each pin, where 0 =

 

 

disabled, 1 = enabled

 

 

68

www.amctechcorp.com

Page 68
Image 68
AMC 68VZ328 software manual Programming Structure, Dimmio structure description