Many changes - tidying up the extensions interfaces.
Updating the GPIO command - new command - allreadall
ScrollPhat code
max31855 code (tested with adafruit breakout board)
more tests
updated rht03 code
Raspberry Pi v3 support.
diff --git a/gpio/readall.c b/gpio/readall.c
index 278e6ee..cb7e18f 100644
--- a/gpio/readall.c
+++ b/gpio/readall.c
@@ -215,7 +215,14 @@
}
-void cmReadall (void)
+/*
+ * allReadall:
+ * Read all the pins regardless of the model. Primarily of use for
+ * the compute module, but handy for other fiddling...
+ *********************************************************************************
+ */
+
+static void allReadall (void)
{
int pin ;
@@ -292,12 +299,16 @@
printf (" +-----+-----+---------+------+---+--B Plus--+---+------+---------+-----+-----+\n") ;
else if (model == PI_MODEL_ZERO)
printf (" +-----+-----+---------+------+---+-Pi Zero--+---+------+---------+-----+-----+\n") ;
- else
+ else if (model == PI_MODEL_2)
printf (" +-----+-----+---------+------+---+---Pi 2---+---+------+---------+-----+-----+\n") ;
+ else if (model == PI_MODEL_3)
+ printf (" +-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+\n") ;
+ else
+ printf (" +-----+-----+---------+------+---+---Pi ?---+---+------+---------+-----+-----+\n") ;
}
-void piPlusReadall (int model)
+static void piPlusReadall (int model)
{
int pin ;
@@ -314,6 +325,13 @@
}
+/*
+ * doReadall:
+ * Generic read all pins called from main program. Works out the Pi type
+ * and calls the appropriate function.
+ *********************************************************************************
+ */
+
void doReadall (void)
{
int model, rev, mem, maker, overVolted ;
@@ -328,10 +346,21 @@
/**/ if ((model == PI_MODEL_A) || (model == PI_MODEL_B))
abReadall (model, rev) ;
- else if ((model == PI_MODEL_BP) || (model == PI_MODEL_AP) || (model == PI_MODEL_2) || (model == PI_MODEL_ZERO))
+ else if ((model == PI_MODEL_BP) || (model == PI_MODEL_AP) || (model == PI_MODEL_2) || (model == PI_MODEL_3) || (model == PI_MODEL_ZERO))
piPlusReadall (model) ;
else if (model == PI_MODEL_CM)
- cmReadall () ;
+ allReadall () ;
else
printf ("Oops - unable to determine board type... model: %d\n", model) ;
}
+
+/*
+ * doAllReadall:
+ * Force reading of all pins regardless of Pi model
+ *********************************************************************************
+ */
+
+void doAllReadall (void)
+{
+ allReadall () ;
+}