hsk-libs-dev  270
High Speed Karlsruhe XC878 library collection
Macros
I/O Port Pull-Up/-Down Setup

This group contains macros and defines to initialize the pull-up/-down devices of port pins. More...

Macros

#define IO_PORT_PULL_DISABLE   0
 Bit mask to disable pull up/down for all selected pins. More...
 
#define IO_PORT_PULL_ENABLE   0xff
 Bit mask to enable pull up/down for all selected pins. More...
 
#define IO_PORT_PULL_DOWN   0
 Bit mask to select pull down for all selected pins. More...
 
#define IO_PORT_PULL_UP   0xff
 Bit mask to select pull up for all selected pins. More...
 
#define IO_PORT_PULL_INIT(port, pins, pull, dir)
 Sets the pull-up/-down properties of port pins. More...
 

Detailed Description

This group contains macros and defines to initialize the pull-up/-down devices of port pins.

Macro Definition Documentation

§ IO_PORT_PULL_DISABLE

#define IO_PORT_PULL_DISABLE   0

Bit mask to disable pull up/down for all selected pins.

§ IO_PORT_PULL_DOWN

#define IO_PORT_PULL_DOWN   0

Bit mask to select pull down for all selected pins.

§ IO_PORT_PULL_ENABLE

#define IO_PORT_PULL_ENABLE   0xff

Bit mask to enable pull up/down for all selected pins.

§ IO_PORT_PULL_INIT

#define IO_PORT_PULL_INIT (   port,
  pins,
  pull,
  dir 
)
Value:
{ \
SFR_PAGE(_pp1, noSST); \
port##_PUDSEL &= (dir) | ~(pins); \
port##_PUDSEL |= (dir) & (pins); \
port##_PUDEN &= (pull) | ~(pins); \
port##_PUDEN |= (pull) & (pins); \
SFR_PAGE(_pp0, noSST); \
}

Sets the pull-up/-down properties of port pins.

Warning
Expects port page 0 and RMAP 0, take care in ISRs
Parameters
portThe parallel port to configure
pinsA bit mask of the pins to select
pullA bit mask of pins to activate the internal pull up/down device for
dirA bit mask of pins to set the pull direction

§ IO_PORT_PULL_UP

#define IO_PORT_PULL_UP   0xff

Bit mask to select pull up for all selected pins.