目录:
1.寄存器:
翻阅【树莓派博通BCM2835芯片手册】第6章(89页):
The GPIO has 41 registers. All accesses are assumed to be 32-bit.
Address(总线地址) | FieldName | Description | Size | Read/Write |
---|---|---|---|---|
0x 7E20 0000 | GPFSEL0 | GPIO Function Select 0 | 32 | R/W |
0x 7E20 0000 | GPFSEL0 | GPIO Function Select 0 | 32 | R/W |
0x 7E20 0004 | GPFSEL1 | GPIO Function Select 1 | 32 | R/W |
0x 7E20 0008 | GPFSEL2 | GPIO Function Select 2 | 32 | R/W |
0x 7E20 000C | GPFSEL3 | GPIO Function Select 3 | 32 | R/W |
0x 7E20 0010 | GPFSEL4 | GPIO Function Select 4 | 32 | R/W |
0x 7E20 0014 | GPFSEL5 | GPIO Function Select 5 | 32 | R/W |
0x 7E20 0018 | - | Reserved | - | - |
0x 7E20 001C | GPSET0 | GPIO Pin Output Set 0 | 32 | W |
0x 7E20 0020 | GPSET1 | GPIO Pin Output Set 1 | 32 | W |
0x 7E20 0024 | - | Reserved | - | - |
0x 7E20 0028 | GPCLR0 | GPIO Pin Output Clear 0 | 32 | W |
0x 7E20 002C | GPCLR1 | GPIO Pin Output Clear 1 | 32 | W |
0x 7E20 0030 | - | Reserved | - | - |
0x 7E20 0034 | GPLEV0 | GPIO Pin Level 0 | 32 | R |
0x 7E20 0038 | GPLEV1 | GPIO Pin Level 1 | 32 | R |
0x 7E20 003C | - | Reserved | - | - |
0x 7E20 0040 | GPEDS0 | GPIO Pin Event Detect Status 0 | 32 | R/W |
0x 7E20 0044 | GPEDS1 | GPIO Pin Event Detect Status 1 | 32 | R/W |
0x 7E20 0048 | - | Reserved | - | - |
0x 7E20 004C | GPREN0 | GPIO Pin Rising Edge Detect Enable 0 | 32 | R/W |
0x 7E20 0050 | GPREN1 | GPIO Pin Rising Edge Detect Enable 1 | 32 | R/W |
0x 7E20 0054 | - | Reserved | - | - |
0x 7E20 0058 | GPFEN0 | GPIO Pin Falling Edge Detect Enable 0 | 32 | R/W |
0x 7E20 005C | GPFEN1 | GPIO Pin Falling Edge Detect Enable 1 | 32 | R/W |
0x 7E20 0060 | - | Reserved | - | - |
0x 7E20 0064 | GPHEN0 | GPIO Pin High Detect Enable 0 | 32 | R/W |
0x 7E20 0068 | GPHEN1 | GPIO Pin High Detect Enable 1 | 32 | R/W |
0x 7E20 006C | - | Reserved | - | - |
0x 7E20 0070 | GPLEN0 | GPIO Pin Low Detect Enable 0 | 32 | R/W |
0x 7E20 0074 | GPLEN1 | GPIO Pin Low Detect Enable 1 | 32 | R/W |
0x 7E20 0078 | - | Reserved | - | - |
0x 7E20 007C | GPAREN0 | GPIO Pin Async. Rising Edge Detect 0 | 32 | R/W |
0x 7E20 0080 | GPAREN1 | GPIO Pin Async. Rising Edge Detect 1 | 32 | R/W |
0x 7E20 0084 | - | Reserved | - | - |
0x 7E20 0088 | GPAFEN0 | GPIO Pin Async. Falling Edge Detect 0 | 32 | R/W |
0x 7E20 008C | GPAFEN1 | GPIO Pin Async. Falling Edge Detect 1 | 32 | R/W |
0x 7E20 0090 | - | Reserved | - | - |
0x 7E20 0094 | GPPUD | GPIO Pin Pull-up/down Enable | 32 | R/W |
0x 7E20 0098 | GPPUDCLK0 | GPIO Pin Pull-up/down Enable Clock 0 | 32 | R/W |
0x 7E20 009C | GPPUDCLK1 | GPIO Pin Pull-up/down Enable Clock 1 | 32 | R/W |
0x 7E20 00A0 | - | Reserved | - | - |
0x 7E20 00B0 | - | Test | 4 | R/W |
2.寄存器类型:
(1)GPFSEL:GPIO Function Select Registers(功能选择寄存器)
翻阅【树莓派博通BCM2835芯片手册】第6章(91页):
此处 FSEL0 ~ FSEL9 表示引脚 0 ~ 9
此处表示操控 FSEL0 ~ FSEL9(引脚 0 ~ 9)则要操控寄存器 GPFSEL0 的 bit(s)0 ~ bit(s)29,按照手册以此类推