libflashprog: Allow to query bus types, voltage, and test status

This is mostly an export of the long stable internal structures. We do
some renames, though,  and provide the voltage range as floating point
numbers. While we are at it, also rename:
* flashprog_test_status.wp      => .block_protection,
* BUS_PROG                      => BUS_OPAQUE,
* BUS_NONSPI                    => BUS_PRESPI.
The last one is a pseudonym for the older, memory-mapped buses, and
doesn't include BUS_OPAQUE.

Also try to name the captured test state consistently, either `tested`
or `status`.

Change-Id: Ibefb923fa5f566daa804651aa1a9bfe5602ca364
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/482
diff --git a/flashprog.c b/flashprog.c
index 2c27eb5..d042c58 100644
--- a/flashprog.c
+++ b/flashprog.c
@@ -584,7 +584,7 @@
 	 * FIXME: Once all chipsets and flash chips have been updated, NONSPI
 	 * will cease to exist and should be eliminated here as well.
 	 */
-	if (bustype == BUS_NONSPI) {
+	if (bustype == BUS_PRESPI) {
 		ret = strcat_realloc(ret, "Non-SPI, ");
 	} else {
 		if (bustype & BUS_PARALLEL)
@@ -595,7 +595,7 @@
 			ret = strcat_realloc(ret, "FWH, ");
 		if (bustype & BUS_SPI)
 			ret = strcat_realloc(ret, "SPI, ");
-		if (bustype & BUS_PROG)
+		if (bustype & BUS_OPAQUE)
 			ret = strcat_realloc(ret, "Programmer-specific, ");
 		if (bustype == BUS_NONE)
 			ret = strcat_realloc(ret, "None, ");