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/internal.c b/internal.c
index 7f9713a..4c2a28b 100644
--- a/internal.c
+++ b/internal.c
@@ -187,7 +187,7 @@
 	 * is found, the host controller init routine sets the
 	 * internal_buses_supported bitfield.
 	 */
-	internal_buses_supported = BUS_NONSPI;
+	internal_buses_supported = BUS_PRESPI;
 
 	if (try_mtd(prog) == 0) {
 		ret = 0;
@@ -277,7 +277,7 @@
 	}
 #endif
 
-	if (internal_buses_supported & BUS_NONSPI) {
+	if (internal_buses_supported & BUS_PRESPI) {
 		register_par_master(&par_master_internal, internal_buses_supported,
 				    internal->rom_base, internal->max_rom_decode, NULL);
 	}