func Wait16(addr uint32, pos int, mask int, val uint16) {
	for Get16(addr, pos, mask) != val {
		runtime.Gosched()
	}
}
Wait16 waits for a specific register bit to match a value. This function
cannot be used before runtime initialization with `GOOS=tamago`.
package reg
import (
	"runtime"
	"time"
	"unsafe"
)
func Get16(addr uint32, pos int, mask int) uint16 {
	reg := (*uint16)(unsafe.Pointer(uintptr(addr)))
	return (*reg >> pos) & uint16(mask)
}
func Set16(addr uint32, pos int) {
	reg := (*uint16)(unsafe.Pointer(uintptr(addr)))
	*reg |= (1 << pos)
}
func Clear16(addr uint32, pos int) {
	reg := (*uint16)(unsafe.Pointer(uintptr(addr)))
	*reg &= ^(1 << pos)
}
func SetN16(addr uint32, pos int, mask int, val uint16) {
	reg := (*uint16)(unsafe.Pointer(uintptr(addr)))
	*reg = (*reg & (^(uint16(mask) << pos))) | (val << pos)
}
func ClearN16(addr uint32, pos int, mask int) {
	reg := (*uint16)(unsafe.Pointer(uintptr(addr)))
	*reg &= ^(uint16(mask) << pos)
}
func Read16(addr uint32) uint16 {
	reg := (*uint16)(unsafe.Pointer(uintptr(addr)))
	return *reg
}
func Write16(addr uint32, val uint16) {
	reg := (*uint16)(unsafe.Pointer(uintptr(addr)))
	*reg = val
}
func WriteBack16(addr uint32) {
	reg := (*uint16)(unsafe.Pointer(uintptr(addr)))
	*reg |= *reg
}
func Or16(addr uint32, val uint16) {
	reg := (*uint16)(unsafe.Pointer(uintptr(addr)))
	*reg |= val
}