PSOC E8XXGP Device Support Library

| PSOC E8XXGP Device Support Library

Macros
Pin drive mode
PDL API Reference » GPIO (General Purpose Input Output) » Macros

## General Description

Constants to be used for setting the drive mode of the pin.

There are eight primary drive modes. Below diagrams are simplified output driver diagrams of the pin view for the CPU register and UDB/DSI based digital peripherals on each of the eight drive modes.

Below is a simplified output driver diagram that shows the pin view for fixed-function-based peripherals for each of the eight drive modes.

- High-Impedance: This is the standard high-impedance (HI-Z) state recommended for analog and digital inputs. For digital signals, the input buffer is enabled; for analog signals, the input buffer is typically disabled to reduce crowbar current and leakage in low-power designs. To achieve the lowest device current, unused GPIOs must be configured to the high-impedance drive mode with input buffer disabled. Highimpedance drive mode with input buffer disabled is also the default pin reset state.
- Resistive Pull-Up or Resistive Pull-Down: Resistive modes provide a series resistance in one of the data states and strong drive in the other. Pins can be used for either digital input or digital output in these modes. If resistive pull-up is required, a '1' must be written to that pin's Data Register bit. If resistive pull-down is required, a '0' must be written to that pin's Data Register. Interfacing mechanical switches is a common application of these drive modes. The resistive modes are also used to interface PSoC with open drain drive lines. Resistive pull-up is used when the input is open drain low and resistive pull-down is used when the input is open drain high.
- Open Drain Drives High and Open Drain Drives Low: Open drain modes provide high impedance in one of the data states and strong drive in the other. Pins are useful as digital inputs or outputs in these modes. Therefore, these modes are widely used in bidirectional digital communication. Open drain drive high mode is used when the signal is externally pulled down and open drain drive low is used when the signal is externally pulled high. A common application for the open drain drives low mode is driving I2C bus signal lines.
- Strong Drive: The strong drive mode is the standard digital output mode for pins; it provides a strong CMOS output drive in both high and low states. Strong drive mode pins should not be used as inputs under normal circumstances. This mode is often used for digital output signals or to drive external devices.
- Resistive Pull-Up and Resistive Pull-Down: In the resistive pull-up and pull-down mode, the GPIO will have a series resistance in both logic 1 and logic 0 output states. The high data state is pulled up while the low data state is pulled down. This mode is useful when the pin is driven by other signals that may cause shorts.

## Macros
#define | CY_GPIO_DM_ANALOG (0x00UL)
| Analog High-Z. More...
#define | CY_GPIO_DM_INVALID_IN_OFF (0x01UL)
| Invalid mode. More...
#define | CY_GPIO_DM_PULLUP_IN_OFF (0x02UL)
| Resistive Pull-Up. More...
#define | CY_GPIO_DM_PULLDOWN_IN_OFF (0x03UL)
| Resistive Pull-Down. More...
#define | CY_GPIO_DM_OD_DRIVESLOW_IN_OFF (0x04UL)
| Open Drain, Drives Low. More...
#define | CY_GPIO_DM_OD_DRIVESHIGH_IN_OFF (0x05UL)
| Open Drain, Drives High. More...
#define | CY_GPIO_DM_STRONG_IN_OFF (0x06UL)
| Strong Drive. More...
#define | CY_GPIO_DM_PULLUP_DOWN_IN_OFF (0x07UL)
| Resistive Pull-Up/Down. More...
#define | CY_GPIO_DM_HIGHZ (0x08UL)
| Digital High-Z. More...
#define | CY_GPIO_DM_INVALID (0x09UL)
| Invalid mode. More...
#define | CY_GPIO_DM_PULLUP (0x0AUL)
| Resistive Pull-Up. More...
#define | CY_GPIO_DM_PULLDOWN (0x0BUL)
| Resistive Pull-Down. More...
#define | CY_GPIO_DM_OD_DRIVESLOW (0x0CUL)
| Open Drain, Drives Low. More...
#define | CY_GPIO_DM_OD_DRIVESHIGH (0x0DUL)
| Open Drain, Drives High. More...
#define | CY_GPIO_DM_STRONG (0x0EUL)
| Strong Drive. More...
#define | CY_GPIO_DM_PULLUP_DOWN (0x0FUL)
| Resistive Pull-Up/Down. More...
#define | CY_GPIO_DM_CFGOUT3_STRONG_PULLUP_HIGHZ (0x80UL)
| Strong Drive/Resistive Pull-Up/High-Z based on data_out_en and data_out signals. More...

## Macro Definition Documentation

## ◆ CY_GPIO_DM_ANALOG

#define CY_GPIO_DM_ANALOG (0x00UL)

Analog High-Z.

Input buffer off

## ◆ CY_GPIO_DM_INVALID_IN_OFF

#define CY_GPIO_DM_INVALID_IN_OFF (0x01UL)

Invalid mode.

It should not be used

## ◆ CY_GPIO_DM_PULLUP_IN_OFF

#define CY_GPIO_DM_PULLUP_IN_OFF (0x02UL)

Resistive Pull-Up.

Input buffer off

## ◆ CY_GPIO_DM_PULLDOWN_IN_OFF

#define CY_GPIO_DM_PULLDOWN_IN_OFF (0x03UL)

Resistive Pull-Down.

Input buffer off

## ◆ CY_GPIO_DM_OD_DRIVESLOW_IN_OFF

#define CY_GPIO_DM_OD_DRIVESLOW_IN_OFF (0x04UL)

Open Drain, Drives Low.

Input buffer off

## ◆ CY_GPIO_DM_OD_DRIVESHIGH_IN_OFF

#define CY_GPIO_DM_OD_DRIVESHIGH_IN_OFF (0x05UL)

Open Drain, Drives High.

Input buffer off

## ◆ CY_GPIO_DM_STRONG_IN_OFF

#define CY_GPIO_DM_STRONG_IN_OFF (0x06UL)

Strong Drive.

Input buffer off

## ◆ CY_GPIO_DM_PULLUP_DOWN_IN_OFF

#define CY_GPIO_DM_PULLUP_DOWN_IN_OFF (0x07UL)

Resistive Pull-Up/Down.

Input buffer off

## ◆ CY_GPIO_DM_HIGHZ

#define CY_GPIO_DM_HIGHZ (0x08UL)

Digital High-Z.

Input buffer on

## ◆ CY_GPIO_DM_INVALID

#define CY_GPIO_DM_INVALID (0x09UL)

Invalid mode.

It should not be used

## ◆ CY_GPIO_DM_PULLUP

#define CY_GPIO_DM_PULLUP (0x0AUL)

Resistive Pull-Up.

Input buffer on

## ◆ CY_GPIO_DM_PULLDOWN

#define CY_GPIO_DM_PULLDOWN (0x0BUL)

Resistive Pull-Down.

Input buffer on

## ◆ CY_GPIO_DM_OD_DRIVESLOW

#define CY_GPIO_DM_OD_DRIVESLOW (0x0CUL)

Open Drain, Drives Low.

Input buffer on

## ◆ CY_GPIO_DM_OD_DRIVESHIGH

#define CY_GPIO_DM_OD_DRIVESHIGH (0x0DUL)

Open Drain, Drives High.

Input buffer on

## ◆ CY_GPIO_DM_STRONG

#define CY_GPIO_DM_STRONG (0x0EUL)

Strong Drive.

Input buffer on

## ◆ CY_GPIO_DM_PULLUP_DOWN

#define CY_GPIO_DM_PULLUP_DOWN (0x0FUL)

Resistive Pull-Up/Down.

Input buffer on

## ◆ CY_GPIO_DM_CFGOUT3_STRONG_PULLUP_HIGHZ

#define CY_GPIO_DM_CFGOUT3_STRONG_PULLUP_HIGHZ (0x80UL)

Strong Drive/Resistive Pull-Up/High-Z based on data_out_en and data_out signals.

It is applicable for I3C