Skip to content

Commit

Permalink
Merge pull request zhaolei#2 from nopnop2002/h3
Browse files Browse the repository at this point in the history
Change pin assign to Full compatible to WiringPi.
  • Loading branch information
zhaolei committed Mar 31, 2016
2 parents 4d02d1e + 1d7377a commit f0ba6cc
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 69 deletions.
42 changes: 21 additions & 21 deletions gpio/readall.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,27 +117,27 @@ guenter ende */
// guenter anfang
static int physToWpi [64] =
{
-1, // 0
-1, -1, //1, 2
-1, -1, //3, 4
-1, -1, //5, 6
6, -1, //7, 8
-1, -1, //9, 10
-1, 1, //11, 12
-1, -1, //13, 14
-1, 4, //15, 16
-1, 5, //17, 18
-1, -1, //19, 20
-1, -1, //21, 22
-1, -1, //23, 24
-1, -1, //25, 26
-1, -1, //27, 28
7, -1, //29, 30
8, 9, //31, 32
10, -1, //33, 34
12, 13, //35, 36
14, 15, //37, 38
-1, 16, //39, 40
-1, // 0
-1, -1, // 1, 2
8, -1, // 3, 4
9, -1, // 5, 6
7, 15, // 7, 8
-1, 16, // 9, 10
0, 1, //11, 12
2, -1, //13, 14
3, 4, //15, 16
-1, 5, //17, 18
12, -1, //19, 20
13, 6, //21, 22
14, 10, //23, 24
-1, 11, //25, 26
30, 31, //27, 28
21, -1, //29, 30
22, 26, //31, 32
23, -1, //33, 34
24, 27, //35, 36
25, 28, //37, 38
-1, 29, //39, 40
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //41-> 55
-1, -1, -1, -1, -1, -1, -1, -1 // 56-> 63
} ;
Expand Down
96 changes: 48 additions & 48 deletions wiringPi/wiringPi.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,22 +651,22 @@ static int upDnConvert[3] = {7, 7, 5};
// 64 - 95 = PC00-PC31
static int pinToGpio_BP [64] =
{
-1,110,
-1,-1,
68,71,
6,7,
8,200,
9,-1,
10,201,
20,198,
199, -1,
-1, -1,
-1, -1,
-1, -1,
-1, -1,
-1, -1,
-1,-1,
-1,-1, // ...31
1,110, // 0, 1
0, 3, // 2, 3
68, 71, // 4 5
2, 6, // 6, 7
12, 11, // 8, 9
67, 21, //10,11
64, 65, //12,13
66, 13, //14,15
14, -1, //16,17
-1, -1, //18,19
-1, 7, //20,21
8, 9, //22,23
10, 20, //24,25
200,201, //26,27
198,199, //28,29
19, 18, //30,31

-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // ... 47
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,// ... 63
Expand Down Expand Up @@ -694,20 +694,20 @@ static int pinTobcm_BP [64] =
37, 274, //map to BCM GPIO26,27
#endif

-1, -1,
-1, -1,
19, 18, //map to BCM GPIO0,1
12, 11, //map to BCM GPIO2,3
6, 7, //map to BCM GPIO4,5
8, -1, //map to BCM GPIO6,7
-1, -1,
-1, -1,
8, 21, //map to BCM GPIO6,7
67, 65, //map to BCM GPIO8,9
64, 66, //map to BCM GPIO10,11
200, 9, //map to BCM GPIO12,13
-1, -1, //map to BCM GPIO14,15
201, -1, //map to BCM GPIO16,17
13, 14, //map to BCM GPIO14,15
201, 1, //map to BCM GPIO16,17
110, 10, //map to BCM GPIO18,19
198,199, //map to BCM GPIO20,21
-1, 68, //map to BCM GPIO22,23
71, -1, //map to BCM GPIO24,25
20, -1, //map to BCM GPIO26,27
3, 68, //map to BCM GPIO22,23
71, 2, //map to BCM GPIO24,25
20, 0, //map to BCM GPIO26,27

-1,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 29... 44
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //45... 60
Expand Down Expand Up @@ -746,26 +746,26 @@ guenter ende */
static int physToGpio_BP [64] =
{
-1, // 0
-1, -1, //1, 2
-1, -1, //3, 4
-1, -1, //5, 6
6, -1, //7, 8
-1, -1, //9, 10
-1, 110, //11, 12
-1, -1, //13, 14
-1, 68, //15, 16
-1, 71, //17, 18
-1, -1, //19, 20
-1, -1, //21, 22
-1, -1, //23, 24
-1, -1, //25, 26
-1, -1, //27, 28
7, -1, //29, 30
8, 200, //31, 32
9, -1, //33, 34
10, 201, //35, 36
20, 198, //37, 38
-1, 199, //39, 40
-1, -1, // 1, 2
12, -1, // 3, 4
11, -1, // 5, 6
6, 13, // 7, 8
-1, 14, // 9, 10
1, 110, //11, 12
0, -1, //13, 14
3, 68, //15, 16
-1, 71, //17, 18
64, -1, //19, 20
65, 2, //21, 22
66, 67, //23, 24
-1, 21, //25, 26
19, 18, //27, 28
7, -1, //29, 30
8, 200, //31, 32
9, -1, //33, 34
10, 201, //35, 36
20, 198, //37, 38
-1, 199, //39, 40
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //41-> 55
-1, -1, -1, -1, -1, -1, -1, -1 // 56-> 63
} ;
Expand Down Expand Up @@ -889,9 +889,9 @@ static int BP_PIN_MASK[9][32] = //[BANK] [INDEX]
// guenter anfang ... welche pins werden freigegeben .. -1 = gesperrt
static int BP_PIN_MASK[9][32] = //[BANK] [INDEX]
{
{-1,-1,-1,-1,-1,-1, 6, 7, 8, 9,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,20,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},//PA
{ 0, 1, 2, 3,-1,-1, 6, 7, 8, 9,10,11,12,13,14,-1,-1,-1,18,19,20,21,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},//PA
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},//PB
{-1,-1,-1,-1, 4,-1,-1, 7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},//PC
{ 0, 1, 2, 3, 4,-1,-1, 7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},//PC
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,14,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},//PD
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},//PE
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},//PF
Expand Down

0 comments on commit f0ba6cc

Please sign in to comment.