Skip to content

Commit

Permalink
gpio mapping fuer rpi rev >= 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph committed Jan 31, 2015
1 parent 5ba47c4 commit d99f7d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions doc/protokoll_analyse.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Raspberry-Pi-GPIO-Pin-Belegung an unserer Lochrasterplatine (Pin1=Rotes Flachban
GND <--> PINBUS_01 <--> LR_PIN_01 <--> RP_06 <--> GND
BUSY (schw) <--> PINBUS_03 <--> LR_PIN_02 <--> RP_07 <--> GPIO_04
STAT (weiß) <--> PINBUS_04 <--> LR_PIN_03 <--> RP_11 <--> GPIO_17
DAT_0 <--> PINBUS_11 <--> LR_PIN_04 <--> RP_12 <--> GPIO_18 <<<--- fehler
DAT_1 <--> PINBUS_12 <--> LR_PIN_05 <--> RP_13 <--> GPIO_21
DAT_0 <--> PINBUS_11 <--> LR_PIN_04 <--> RP_12 <--> GPIO_18
DAT_1 <--> PINBUS_12 <--> LR_PIN_05 <--> RP_13 <--> GPIO_27 <-- (Vorsicht in HW_REV1 GPIO_21)
DAT_2 <--> PINBUS_13 <--> LR_PIN_06 <--> RP_15 <--> GPIO_22
DAT_3 <--> PINBUS_14 <--> LR_PIN_07 <--> RP_16 <--> GPIO_23
DAT_4 <--> PINBUS_15 <--> LR_PIN_08 <--> RP_18 <--> GPIO_24
Expand Down
2 changes: 1 addition & 1 deletion pinbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define END_OF_MSG_CHAR 0xFF

#define GPIO_BUS_PIN0 18
#define GPIO_BUS_PIN1 21
#define GPIO_BUS_PIN1 27
#define GPIO_BUS_PIN2 22
#define GPIO_BUS_PIN3 23
#define GPIO_BUS_PIN4 24
Expand Down
4 changes: 2 additions & 2 deletions tools/gpio_sysfs.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash

for gpio in 4 17 18 21 22 23 24 10 9 25 11 8 7; do
for gpio in 4 17 18 27 22 23 24 10 9 25 11 8 7; do
echo $gpio > /sys/class/gpio/export
done

while [ 1 ]; do
for gpio in 4 17 18 21 22 23 24 10 9 25 11 8 7; do
for gpio in 4 17 18 27 22 23 24 10 9 25 11 8 7; do
echo -n "gpio$gpio: "
cat /sys/class/gpio/gpio${gpio}/value
done
Expand Down

0 comments on commit d99f7d6

Please sign in to comment.