device registry: fix returned index for PPS
zpuino: use C standard for normal C calls, add some defines for MAX/MIN