beautypg.com

User_io_config(), User_io_read(), User_io_write() – Maxim Integrated 73S12xxF Software User Manual

Page 60: Int2_config(), E 60)

background image

73S12xxF Software User Guide

UG_12xxF_016

60

Rev. 1.50

USER_IO_Config()

Purpose

Configure the direction for the USER IO pins.


Synopsis

void USER_IO_ Config ( Unsigned char usrsrc, Unsigned char dir )


Parameters

usrsrc: Input parameter
Corresponding USR pins to be configured as Input or Output. USRIO 0 through 7
will be configured according to the Dir parameter below.

Dir: Input parameter
Direction value (1=input, 0=output) for the selected pins.


Return Codes None.


USER_IO_Read()

Purpose

Read the value of the USER IO pins.


Synopsis

void USER_IO_Read ( OUT char *user_dir, OUT char *user_data );


Parameters

User_dir: Output parameter
Direction value (1=input, 0=output) for the selected pins.

User_data: Output parameter
Value of the corresponding USER IO pins. All outputs will reflect the last value
written.


Return Codes None.


USER_IO_Write()

Purpose

Write values to selected USER IO pins.


Synopsis

Void USER_IO_Write ( IN char cUserIO, IN char cUserIOselect );


Parameters

cUserIO: Input parameter
Values to write to selected USER IO pins.

cUserIOselect: Input parameter
A ‘1in the corresponding bit will enable writing to that USR pin provided it is
configured as an output.

Return Codes None.

4.2.14 External Interrupts API – Available with all 73S12xxF Devices

This API allows direct access to the two external interrupt pins (EXT3 and EXT2). These two interrupts
are only available as edge (falling/negative or rising/positive) sensitive. The API includes:

INT2_Config()

(page 60)

INT2_Read()

(page 61)

INT3_Config()

(page 61)

INT3_Read()

(page 61)

INT2_Config()

Purpose

Configure External Interrupt 2.


Synopsis

void INT2_Config ( Unsigned char Enable, Unsigned char Polarity );