beautypg.com

Usr_int_config (), Usr_int_read(), E 59) – Maxim Integrated 73S12xxF Software User Manual

Page 59: E 60)

background image


UG_12xxF_016

73S12xxF Software User Guide

Rev. 1.50

59

USR_INT_Config ()

Purpose

Configure USER IO as an interrupt source for T0, T1, INT0 or INT1.


Synopsis

void USR_INT_Config (

IN enum USRINTSRC usr_src,

IN enum USRINTSEL int_select,

IN Boolean

Enable,

IN Boolean

EdgeTrigger )


Parameters

usr_src: Input parameter
Specifies which USER IO is to be used as the interrupt source. The available
choices (defined in USRINTSRC in api_struct_12.h) are:

USR0SRC

0,

USR1SRC

1,

USR2SRC

2,

USR3SRC

3,

USR4SRC

4,

USR5SRC

5,

USR6SRC

6,

USR7SRC

7

Int_select: Input parameter
Selects the interrupt source (defined in USRINTSEL in api_struct_12.h) as:

NOT_USE1

0,

NOT_USE2

1,

SEL_TIMER0

2,

SEL_TIMER1

3,

SEL_INT0_HI_RISE

4,

SEL_INT1_HI_RISE

5,

SEL_INT0_LOW_FALL 6,
SEL_INT1_LOW_FALL 7;

Enable: Input parameter
If TRUE, enables the selected interrupt source; otherwise, disables it.

EdgeTrigger: Inupt parameter
For INT0 and INT1 only, sets the interrupt to be level (FALSE) or edge (TRUE).


Return Codes None.

USR_INT_Read()

Purpose

Read the current interrupt settings of the specified USER IO pin.


Synopsis

enum USRINTSEL USR_INT_Read ( enum USRINTSRC usr_src );


Parameters

usr_src: Input parameter
Corresponding USR pin to read the interrupt setting from.


Return Codes One of the following as defined in USRINTSEL:

NULL,
SEL_TIMER0

2,

SEL_TIMER1

3,

SEL_INT0_HI_RISE

4,

SEL_INT1_HI_RISE

5,

SEL_INT0_LOW_FALL

6,

SEL_INT1_LOW_FALL

7;