Raspberry Pi 3B+ and 3A+ both use BCM2837B0, essentially the same devices, the 3B+ has 1GB RAM, Ethernet and wireless. Both have 17× GPIO, and HAT ID bus

So only small modification is needed to wiringPi, you can do it by hand if you don't want to patch.

- git clone git://git.drogon.net/wiringPi
- cd wiringPi

For future reference just search for all: PI_MODEL_3P using grep, and add matching entry for PI_MODEL_3AP

grep -rni "PI_MODEL_3P" *
gpio/readall.c:308: else if (model == PI_MODEL_3P)

gpio/readall.c:357: (model == PI_MODEL_3) || (model == PI_MODEL_3P) ||

wiringPi/wiringPi.h:102: #define PI_MODEL_3P 13[/color]

Then:

update : wiringPi/wiringPi.h:
**update : wiringPi/wiringPi.c **
Code: Select all

```
const char *piModelNames [16] =
// replace - "Unknown14" with "Pi 3A+"
```

run

./build

Your done.

Diff patch
Code: Select all

```
index 9396c6d..10b5a82 100644
--- a/gpio/readall.c
+++ b/gpio/readall.c
@@ -307,6 +307,8 @@ static void plus2header (int model)
printf (" +-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+\n") ;
else if (model == PI_MODEL_3P)
printf (" +-----+-----+---------+------+---+---Pi 3+--+---+------+---------+-----+-----+\n") ;
+ else if (model == PI_MODEL_3AP)
+ printf (" +-----+-----+---------+------+---+---Pi 3A+--+---+------+---------+-----+-----+\n") ;
else
printf (" +-----+-----+---------+------+---+---Pi ?---+---+------+---------+-----+-----+\n") ;
}
@@ -353,6 +355,7 @@ void doReadall (void)
else if ((model == PI_MODEL_BP) || (model == PI_MODEL_AP) ||
(model == PI_MODEL_2) ||
(model == PI_MODEL_3) || (model == PI_MODEL_3P) ||
+ (model == PI_MODEL_3AP) ||
(model == PI_MODEL_ZERO) || (model == PI_MODEL_ZERO_W))
piPlusReadall (model) ;
else if ((model == PI_MODEL_CM) || (model == PI_MODEL_CM3))
diff --git a/version.h b/version.h
index 242c62b..683e200 100644
--- a/version.h
+++ b/version.h
@@ -1,3 +1,3 @@
-#define VERSION "2.46"
+#define VERSION "2.47"
#define VERSION_MAJOR 2
-#define VERSION_MINOR 46
+#define VERSION_MINOR 47
diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c
index 586b148..c7617b7 100644
--- a/wiringPi/wiringPi.c
+++ b/wiringPi/wiringPi.c
@@ -234,7 +234,7 @@ const char *piModelNames [16] =
"Unknown11", // 11
"Pi Zero-W", // 12
"Pi 3+", // 13
- "Unknown14", // 14
+ "Pi 3A+", // 14
"Unknown15", // 15
} ;
diff --git a/wiringPi/wiringPi.h b/wiringPi/wiringPi.h
index ae5d647..d4ca6d0 100644
--- a/wiringPi/wiringPi.h
+++ b/wiringPi/wiringPi.h
@@ -100,6 +100,7 @@
#define PI_MODEL_CM3 10
#define PI_MODEL_ZERO_W 12
#define PI_MODEL_3P 13
+#define PI_MODEL_3AP 14
#define PI_VERSION_1 0
#define PI_VERSION_1_1 1
```