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.
This commit is contained in:
@@ -215,7 +215,14 @@ static void readallPhys (int physPin)
|
||||
}
|
||||
|
||||
|
||||
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 @@ static void plus2header (int model)
|
||||
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 @@ void piPlusReadall (int model)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 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 @@ void doReadall (void)
|
||||
|
||||
/**/ 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 () ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user