Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
digilent-pmod.h File Reference

Pmod GPIO nexus signal index definitions. More...

Go to the source code of this file.

Macros

#define PMOD_IO(n)   ((n) - 1)
 For reference see the Pmod interface specification: https://digilent.com/reference/_media/reference/pmod/pmod-interface-specification-1_2_0.pdf.
 
#define PMOD_SPI_CS   PMOD_IO(1)
 SPI CS signal index on a Pmod GPIO nexus node.
 
#define PMOD_SPI_MOSI   PMOD_IO(2)
 SPI MOSI signal index on a Pmod GPIO nexus node.
 
#define PMOD_SPI_MISO   PMOD_IO(3)
 SPI MISO signal index on a Pmod GPIO nexus node.
 
#define PMOD_SPI_SCK   PMOD_IO(4)
 SPI SCK signal index on a Pmod GPIO nexus node.
 
#define PMOD_EXP_SPI_CS   PMOD_IO(1)
 SPI CS signal index on a Pmod GPIO nexus node.
 
#define PMOD_EXP_SPI_MOSI   PMOD_IO(2)
 SPI MOSI signal index on a Pmod GPIO nexus node.
 
#define PMOD_EXP_SPI_MISO   PMOD_IO(3)
 SPI MISO signal index on a Pmod GPIO nexus node.
 
#define PMOD_EXP_SPI_SCK   PMOD_IO(4)
 SPI SCK signal index on a Pmod GPIO nexus node.
 
#define PMOD_EXP_SPI_INT   PMOD_IO(5)
 INT alternate signal index on a Pmod GPIO nexus node.
 
#define PMOD_EXP_SPI_RESET   PMOD_IO(6)
 RESET alternate signal index on a Pmod GPIO nexus node.
 
#define PMOD_EXP_SPI_CS2   PMOD_IO(7)
 SPI CS2 alternate signal index on a Pmod GPIO nexus node.
 
#define PMOD_EXP_SPI_CS3   PMOD_IO(8)
 SPI CS3 alternate signal index on a Pmod GPIO nexus node.
 
#define PMOD_EXP_UART_INT   PMOD_IO(5)
 INT alternate signal index on a Pmod GPIO nexus node.
 
#define PMOD_EXP_UART_RESET   PMOD_IO(6)
 RESET alternate signal index on a Pmod GPIO nexus node.
 
#define PMOD_HBRIDGE_DIR   PMOD_IO(1)
 DIR signal index on a Pmod GPIO nexus node.
 
#define PMOD_HBRIDGE_EN   PMOD_IO(2)
 EN signal index on a Pmod GPIO nexus node.
 
#define PMOD_DUAL_HBRIDGE_DIR1   PMOD_IO(1)
 DIR1 signal index on a Pmod GPIO nexus node.
 
#define PMOD_DUAL_HBRIDGE_EN1   PMOD_IO(2)
 EN1 signal index on a Pmod GPIO nexus node.
 
#define PMOD_DUAL_HBRIDGE_DIR2   PMOD_IO(3)
 DIR2 signal index on a Pmod GPIO nexus node.
 
#define PMOD_DUAL_HBRIDGE_EN2   PMOD_IO(4)
 EN2 signal index on a Pmod GPIO nexus node.
 
#define PMOD_EXP_DUAL_HBRIDGE_DIR1   PMOD_IO(1)
 DIR1 signal index on a Pmod GPIO nexus node.
 
#define PMOD_EXP_DUAL_HBRIDGE_EN1   PMOD_IO(2)
 EN1 signal index on a Pmod GPIO nexus node.
 
#define PMOD_EXP_DUAL_HBRIDGE_DIR2   PMOD_IO(5)
 DIR2 signal index on a Pmod GPIO nexus node.
 
#define PMOD_EXP_DUAL_HBRIDGE_EN2   PMOD_IO(6)
 EN2 signal index on a Pmod GPIO nexus node.
 
#define PMOD_I2C_INT   PMOD_IO(1)
 INT signal index on a Pmod GPIO nexus node.
 
#define PMOD_I2C_RESET   PMOD_IO(2)
 RESET signal index on a Pmod GPIO nexus node.
 
#define PMOD_I2C_SCL   PMOD_IO(3)
 SCL signal index on a Pmod GPIO nexus node.
 
#define PMOD_I2C_SDA   PMOD_IO(4)
 SDA signal index on a Pmod GPIO nexus node.
 

Detailed Description

Pmod GPIO nexus signal index definitions.

Defines meant to be used in conjunction with the "digilent,pmod" GPIO nexus mapping.

Example usage:

&spi1 {
cs-gpios = <&pmod0 PMOD_SPI_CS GPIO_ACTIVE_LOW>;
example_device: example-dev@0 {
compatible = "vnd,spi-device";
reg = <0>;
};
};

Macro Definition Documentation

◆ PMOD_DUAL_HBRIDGE_DIR1

#define PMOD_DUAL_HBRIDGE_DIR1   PMOD_IO(1)

DIR1 signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 5 (dual H-bridge) peripherals.

◆ PMOD_DUAL_HBRIDGE_DIR2

#define PMOD_DUAL_HBRIDGE_DIR2   PMOD_IO(3)

DIR2 signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 5 (dual H-bridge) peripherals.

◆ PMOD_DUAL_HBRIDGE_EN1

#define PMOD_DUAL_HBRIDGE_EN1   PMOD_IO(2)

EN1 signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 5 (dual H-bridge) peripherals.

◆ PMOD_DUAL_HBRIDGE_EN2

#define PMOD_DUAL_HBRIDGE_EN2   PMOD_IO(4)

EN2 signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 5 (dual H-bridge) peripherals.

◆ PMOD_EXP_DUAL_HBRIDGE_DIR1

#define PMOD_EXP_DUAL_HBRIDGE_DIR1   PMOD_IO(1)

DIR1 signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 5A (expanded dual H-bridge) peripherals.

◆ PMOD_EXP_DUAL_HBRIDGE_DIR2

#define PMOD_EXP_DUAL_HBRIDGE_DIR2   PMOD_IO(5)

DIR2 signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 5A (expanded dual H-bridge) peripherals.

◆ PMOD_EXP_DUAL_HBRIDGE_EN1

#define PMOD_EXP_DUAL_HBRIDGE_EN1   PMOD_IO(2)

EN1 signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 5A (expanded dual H-bridge) peripherals.

◆ PMOD_EXP_DUAL_HBRIDGE_EN2

#define PMOD_EXP_DUAL_HBRIDGE_EN2   PMOD_IO(6)

EN2 signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 5A (expanded dual H-bridge) peripherals.

◆ PMOD_EXP_SPI_CS

#define PMOD_EXP_SPI_CS   PMOD_IO(1)

SPI CS signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 2A (expanded SPI) peripherals.

◆ PMOD_EXP_SPI_CS2

#define PMOD_EXP_SPI_CS2   PMOD_IO(7)

SPI CS2 alternate signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 2A (expanded SPI) peripherals.

◆ PMOD_EXP_SPI_CS3

#define PMOD_EXP_SPI_CS3   PMOD_IO(8)

SPI CS3 alternate signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 2A (expanded SPI) peripherals.

◆ PMOD_EXP_SPI_INT

#define PMOD_EXP_SPI_INT   PMOD_IO(5)

INT alternate signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 2A (expanded SPI) peripherals.

◆ PMOD_EXP_SPI_MISO

#define PMOD_EXP_SPI_MISO   PMOD_IO(3)

SPI MISO signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 2A (expanded SPI) peripherals.

◆ PMOD_EXP_SPI_MOSI

#define PMOD_EXP_SPI_MOSI   PMOD_IO(2)

SPI MOSI signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 2A (expanded SPI) peripherals.

◆ PMOD_EXP_SPI_RESET

#define PMOD_EXP_SPI_RESET   PMOD_IO(6)

RESET alternate signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 2A (expanded SPI) peripherals.

◆ PMOD_EXP_SPI_SCK

#define PMOD_EXP_SPI_SCK   PMOD_IO(4)

SPI SCK signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 2A (expanded SPI) peripherals.

◆ PMOD_EXP_UART_INT

#define PMOD_EXP_UART_INT   PMOD_IO(5)

INT alternate signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 3A (expanded UART) peripherals.

◆ PMOD_EXP_UART_RESET

#define PMOD_EXP_UART_RESET   PMOD_IO(6)

RESET alternate signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 3A (expanded UART) peripherals.

◆ PMOD_HBRIDGE_DIR

#define PMOD_HBRIDGE_DIR   PMOD_IO(1)

DIR signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 4 (H-bridge) peripherals.

◆ PMOD_HBRIDGE_EN

#define PMOD_HBRIDGE_EN   PMOD_IO(2)

EN signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 4 (H-bridge) peripherals.

◆ PMOD_I2C_INT

#define PMOD_I2C_INT   PMOD_IO(1)

INT signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 6 (I2C) peripherals.

◆ PMOD_I2C_RESET

#define PMOD_I2C_RESET   PMOD_IO(2)

RESET signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 6 (I2C) peripherals.

◆ PMOD_I2C_SCL

#define PMOD_I2C_SCL   PMOD_IO(3)

SCL signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 6 (I2C) peripherals.

◆ PMOD_I2C_SDA

#define PMOD_I2C_SDA   PMOD_IO(4)

SDA signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 6 (I2C) peripherals.

◆ PMOD_IO

#define PMOD_IO (   n)    ((n) - 1)

For reference see the Pmod interface specification: https://digilent.com/reference/_media/reference/pmod/pmod-interface-specification-1_2_0.pdf.

IO[n] signal on a Pmod GPIO nexus node following Pmod Interface Type 1 or 1A (GPIO or expanded GPIO)

The Pmod GPIO nexus maps pin indexes 0..7 to IO1..IO8.

◆ PMOD_SPI_CS

#define PMOD_SPI_CS   PMOD_IO(1)

SPI CS signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 2 (SPI) peripherals.

◆ PMOD_SPI_MISO

#define PMOD_SPI_MISO   PMOD_IO(3)

SPI MISO signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 2 (SPI) peripherals.

◆ PMOD_SPI_MOSI

#define PMOD_SPI_MOSI   PMOD_IO(2)

SPI MOSI signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 2 (SPI) peripherals.

◆ PMOD_SPI_SCK

#define PMOD_SPI_SCK   PMOD_IO(4)

SPI SCK signal index on a Pmod GPIO nexus node.

Used with Pmod Interface Type 2 (SPI) peripherals.