libpynq (release 5EWC0-2023 version 0.1.0 of 2023-08-14 14:01)
Loading...
Searching...
No Matches
I/O pin mapping

Macros

#define NUM_ANALOG_REFERENCE_PINS   14 /* # analog reference pins */
 
#define NUM_ANALOG_IN_PINS   6 /* # analog input pins */
 
#define NUM_SWITCHBOX_PINS   64 /* # switchbox pins */
 
#define SWB_AR0   0 /* analog reference pin 0 */
 
#define SWB_AR1   1 /* analog reference pin 1 */
 
#define SWB_AR2   2 /* analog reference pin 2 */
 
#define SWB_AR3   3 /* analog reference pin 3 */
 
#define SWB_AR4   4 /* analog reference pin 4 */
 
#define SWB_AR5   5 /* analog reference pin 5 */
 
#define SWB_AR6   6 /* analog reference pin 6 */
 
#define SWB_AR7   7 /* analog reference pin 7 */
 
#define SWB_AR8   8 /* analog reference pin 8 */
 
#define SWB_AR9   9 /* analog reference pin 9 */
 
#define SWB_AR10   10 /* analog reference pin 10 */
 
#define SWB_AR11   11 /* analog reference pin 11 */
 
#define SWB_AR12   12 /* analog reference pin 12 */
 
#define SWB_AR13   13 /* analog reference pin 13 */
 
#define SWB_A0   14 /* analog input pin 0 */
 
#define SWB_A1   15 /* analog input pin 1 */
 
#define SWB_A2   16 /* analog input pin 2 */
 
#define SWB_A3   17 /* analog input pin 3 */
 
#define SWB_A4   18 /* analog input pin 4 */
 
#define SWB_A5   19 /* analog input pin 5 */
 
#define SWB_SW0   20 /* switch input pin 0 */
 
#define SWB_SW1   21 /* switch input pin 1 */
 
#define SWB_BTN0   22 /* button input pin 0 */
 
#define SWB_BTN1   23 /* button input pin 1 */
 
#define SWB_BTN2   24 /* button input pin 2 */
 
#define SWB_BTN3   25 /* button input pin 3 */
 
#define SWB_LD0   26 /* LED output pin 0 */
 
#define SWB_LD1   27 /* LED output pin 1 */
 
#define SWB_LD2   28 /* LED output pin 2 */
 
#define SWB_LD3   29 /* LED output pin 3 */
 
#define SWB_AR_SCL   31 /* I2C clock pin */
 
#define SWB_AR_SDA   30 /* I2C data pin */
 
#define SWB_LD4B   32 /* color LED 0 blue input pin */
 
#define SWB_LD4R   33 /* color LED 0 red input pin */
 
#define SWB_LD4G   34 /* color LED 0 green input pin */
 
#define SWB_LD5B   35 /* color LED 1 blue input pin */
 
#define SWB_LD5R   36 /* color LED 1 red input pin */
 
#define SWB_LD5G   37 /* color LED 1 green input pin */
 
#define SWB_RBPI40   38 /* RaspberryPi header pin */
 
#define SWB_RBPI37   39 /* RaspberryPi header pin */
 
#define SWB_RBPI38   40 /* RaspberryPi header pin */
 
#define SWB_RBPI35   41 /* RaspberryPi header pin */
 
#define SWB_RBPI36   42 /* RaspberryPi header pin */
 
#define SWB_RBPI33   43 /* RaspberryPi header pin */
 
#define SWB_RBPI18   44 /* RaspberryPi header pin */
 
#define SWB_RBPI32   45 /* RaspberryPi header pin */
 
#define SWB_RBPI10   46 /* RaspberryPi header pin */
 
#define SWB_RBPI27   47 /* RaspberryPi header pin */
 
#define SWB_RBPI28   48 /* RaspberryPi header pin */
 
#define SWB_RBPI22   49 /* RaspberryPi header pin */
 
#define SWB_RBPI23   50 /* RaspberryPi header pin */
 
#define SWB_RBPI24   51 /* RaspberryPi header pin */
 
#define SWB_RBPI21   52 /* RaspberryPi header pin */
 
#define SWB_RBPI26   53 /* RaspberryPi header pin */
 
#define SWB_RBPI19   54 /* RaspberryPi header pin */
 
#define SWB_RBPI31   55 /* RaspberryPi header pin */
 
#define SWB_RBPI15   56 /* RaspberryPi header pin */
 
#define SWB_RBPI16   57 /* RaspberryPi header pin */
 
#define SWB_RBPI13   58 /* RaspberryPi header pin */
 
#define SWB_RBPI12   59 /* RaspberryPi header pin */
 
#define SWB_RBPI29   60 /* RaspberryPi header pin */
 
#define SWB_RBPI08   61 /* RaspberryPi header pin */
 
#define SWB_RBPI07   62 /* RaspberryPi header pin */
 
#define SWB_RBPI05   63 /* RaspberryPi header pin */
 

Variables

char *const pin_names [64]
 

Detailed Description

Definitions of I/O pin numbers and names for the switchbox and GPIO.

For example, when calling a function, use SWB_AR0 to specify analog reference pin AR0. Specifically, symbolic pin names are prefixed with SWB_ because they are used as inputs to switchbox functions, but the pin name when printed omits the SWB_.

Macro Definition Documentation

◆ NUM_ANALOG_IN_PINS

#define NUM_ANALOG_IN_PINS   6 /* # analog input pins */

Definition at line 43 of file pinmap.h.

◆ NUM_ANALOG_REFERENCE_PINS

#define NUM_ANALOG_REFERENCE_PINS   14 /* # analog reference pins */

Definition of the number of I/O pins we have for each category.

Definition at line 42 of file pinmap.h.

◆ NUM_SWITCHBOX_PINS

#define NUM_SWITCHBOX_PINS   64 /* # switchbox pins */

Definition at line 44 of file pinmap.h.

◆ SWB_A0

#define SWB_A0   14 /* analog input pin 0 */

Analog input pins.

Definition at line 67 of file pinmap.h.

◆ SWB_A1

#define SWB_A1   15 /* analog input pin 1 */

Definition at line 68 of file pinmap.h.

◆ SWB_A2

#define SWB_A2   16 /* analog input pin 2 */

Definition at line 69 of file pinmap.h.

◆ SWB_A3

#define SWB_A3   17 /* analog input pin 3 */

Definition at line 70 of file pinmap.h.

◆ SWB_A4

#define SWB_A4   18 /* analog input pin 4 */

Definition at line 71 of file pinmap.h.

◆ SWB_A5

#define SWB_A5   19 /* analog input pin 5 */

Definition at line 72 of file pinmap.h.

◆ SWB_AR0

#define SWB_AR0   0 /* analog reference pin 0 */

Analog reference pins.

Definition at line 49 of file pinmap.h.

◆ SWB_AR1

#define SWB_AR1   1 /* analog reference pin 1 */

Definition at line 50 of file pinmap.h.

◆ SWB_AR10

#define SWB_AR10   10 /* analog reference pin 10 */

Definition at line 59 of file pinmap.h.

◆ SWB_AR11

#define SWB_AR11   11 /* analog reference pin 11 */

Definition at line 60 of file pinmap.h.

◆ SWB_AR12

#define SWB_AR12   12 /* analog reference pin 12 */

Definition at line 61 of file pinmap.h.

◆ SWB_AR13

#define SWB_AR13   13 /* analog reference pin 13 */

Definition at line 62 of file pinmap.h.

◆ SWB_AR2

#define SWB_AR2   2 /* analog reference pin 2 */

Definition at line 51 of file pinmap.h.

◆ SWB_AR3

#define SWB_AR3   3 /* analog reference pin 3 */

Definition at line 52 of file pinmap.h.

◆ SWB_AR4

#define SWB_AR4   4 /* analog reference pin 4 */

Definition at line 53 of file pinmap.h.

◆ SWB_AR5

#define SWB_AR5   5 /* analog reference pin 5 */

Definition at line 54 of file pinmap.h.

◆ SWB_AR6

#define SWB_AR6   6 /* analog reference pin 6 */

Definition at line 55 of file pinmap.h.

◆ SWB_AR7

#define SWB_AR7   7 /* analog reference pin 7 */

Definition at line 56 of file pinmap.h.

◆ SWB_AR8

#define SWB_AR8   8 /* analog reference pin 8 */

Definition at line 57 of file pinmap.h.

◆ SWB_AR9

#define SWB_AR9   9 /* analog reference pin 9 */

Definition at line 58 of file pinmap.h.

◆ SWB_AR_SCL

#define SWB_AR_SCL   31 /* I2C clock pin */

I2C pins.

Definition at line 99 of file pinmap.h.

◆ SWB_AR_SDA

#define SWB_AR_SDA   30 /* I2C data pin */

Definition at line 100 of file pinmap.h.

◆ SWB_BTN0

#define SWB_BTN0   22 /* button input pin 0 */

Button input pins.

Definition at line 83 of file pinmap.h.

◆ SWB_BTN1

#define SWB_BTN1   23 /* button input pin 1 */

Definition at line 84 of file pinmap.h.

◆ SWB_BTN2

#define SWB_BTN2   24 /* button input pin 2 */

Definition at line 85 of file pinmap.h.

◆ SWB_BTN3

#define SWB_BTN3   25 /* button input pin 3 */

Definition at line 86 of file pinmap.h.

◆ SWB_LD0

#define SWB_LD0   26 /* LED output pin 0 */

LED output pins.

Definition at line 91 of file pinmap.h.

◆ SWB_LD1

#define SWB_LD1   27 /* LED output pin 1 */

Definition at line 92 of file pinmap.h.

◆ SWB_LD2

#define SWB_LD2   28 /* LED output pin 2 */

Definition at line 93 of file pinmap.h.

◆ SWB_LD3

#define SWB_LD3   29 /* LED output pin 3 */

Definition at line 94 of file pinmap.h.

◆ SWB_LD4B

#define SWB_LD4B   32 /* color LED 0 blue input pin */

The RGB adresses for SWB_LD4 and SWB_LD5.

Definition at line 106 of file pinmap.h.

◆ SWB_LD4G

#define SWB_LD4G   34 /* color LED 0 green input pin */

Definition at line 108 of file pinmap.h.

◆ SWB_LD4R

#define SWB_LD4R   33 /* color LED 0 red input pin */

Definition at line 107 of file pinmap.h.

◆ SWB_LD5B

#define SWB_LD5B   35 /* color LED 1 blue input pin */

Definition at line 110 of file pinmap.h.

◆ SWB_LD5G

#define SWB_LD5G   37 /* color LED 1 green input pin */

Definition at line 112 of file pinmap.h.

◆ SWB_LD5R

#define SWB_LD5R   36 /* color LED 1 red input pin */

Definition at line 111 of file pinmap.h.

◆ SWB_RBPI05

#define SWB_RBPI05   63 /* RaspberryPi header pin */

Definition at line 142 of file pinmap.h.

◆ SWB_RBPI07

#define SWB_RBPI07   62 /* RaspberryPi header pin */

Definition at line 141 of file pinmap.h.

◆ SWB_RBPI08

#define SWB_RBPI08   61 /* RaspberryPi header pin */

Definition at line 140 of file pinmap.h.

◆ SWB_RBPI10

#define SWB_RBPI10   46 /* RaspberryPi header pin */

Definition at line 125 of file pinmap.h.

◆ SWB_RBPI12

#define SWB_RBPI12   59 /* RaspberryPi header pin */

Definition at line 138 of file pinmap.h.

◆ SWB_RBPI13

#define SWB_RBPI13   58 /* RaspberryPi header pin */

Definition at line 137 of file pinmap.h.

◆ SWB_RBPI15

#define SWB_RBPI15   56 /* RaspberryPi header pin */

Definition at line 135 of file pinmap.h.

◆ SWB_RBPI16

#define SWB_RBPI16   57 /* RaspberryPi header pin */

Definition at line 136 of file pinmap.h.

◆ SWB_RBPI18

#define SWB_RBPI18   44 /* RaspberryPi header pin */

Definition at line 123 of file pinmap.h.

◆ SWB_RBPI19

#define SWB_RBPI19   54 /* RaspberryPi header pin */

Definition at line 133 of file pinmap.h.

◆ SWB_RBPI21

#define SWB_RBPI21   52 /* RaspberryPi header pin */

Definition at line 131 of file pinmap.h.

◆ SWB_RBPI22

#define SWB_RBPI22   49 /* RaspberryPi header pin */

Definition at line 128 of file pinmap.h.

◆ SWB_RBPI23

#define SWB_RBPI23   50 /* RaspberryPi header pin */

Definition at line 129 of file pinmap.h.

◆ SWB_RBPI24

#define SWB_RBPI24   51 /* RaspberryPi header pin */

Definition at line 130 of file pinmap.h.

◆ SWB_RBPI26

#define SWB_RBPI26   53 /* RaspberryPi header pin */

Definition at line 132 of file pinmap.h.

◆ SWB_RBPI27

#define SWB_RBPI27   47 /* RaspberryPi header pin */

Definition at line 126 of file pinmap.h.

◆ SWB_RBPI28

#define SWB_RBPI28   48 /* RaspberryPi header pin */

Definition at line 127 of file pinmap.h.

◆ SWB_RBPI29

#define SWB_RBPI29   60 /* RaspberryPi header pin */

Definition at line 139 of file pinmap.h.

◆ SWB_RBPI31

#define SWB_RBPI31   55 /* RaspberryPi header pin */

Definition at line 134 of file pinmap.h.

◆ SWB_RBPI32

#define SWB_RBPI32   45 /* RaspberryPi header pin */

Definition at line 124 of file pinmap.h.

◆ SWB_RBPI33

#define SWB_RBPI33   43 /* RaspberryPi header pin */

Definition at line 122 of file pinmap.h.

◆ SWB_RBPI35

#define SWB_RBPI35   41 /* RaspberryPi header pin */

Definition at line 120 of file pinmap.h.

◆ SWB_RBPI36

#define SWB_RBPI36   42 /* RaspberryPi header pin */

Definition at line 121 of file pinmap.h.

◆ SWB_RBPI37

#define SWB_RBPI37   39 /* RaspberryPi header pin */

Definition at line 118 of file pinmap.h.

◆ SWB_RBPI38

#define SWB_RBPI38   40 /* RaspberryPi header pin */

Definition at line 119 of file pinmap.h.

◆ SWB_RBPI40

#define SWB_RBPI40   38 /* RaspberryPi header pin */

The RaspberryPi header-pin indexing.

Definition at line 117 of file pinmap.h.

◆ SWB_SW0

#define SWB_SW0   20 /* switch input pin 0 */

Switch input pins.

Definition at line 77 of file pinmap.h.

◆ SWB_SW1

#define SWB_SW1   21 /* switch input pin 1 */

Definition at line 78 of file pinmap.h.

Variable Documentation

◆ pin_names

char* const pin_names[64]
extern

Pin names.

Definition at line 24 of file pinmap.c.