DMPAPI(unsigned char) io_In8(void* handle, unsigned long offset) { IO_BASE_t* base = (handle == NULL)? &IO_defaultBase : (IO_BASE_t*)handle; switch (base->iotype) { case IO_USE_PORTIO: return portio_inpb((unsigned short)(base->addr + offset)); case IO_USE_MMIO: return mmio_inpb(base, offset); } return 0; }
DMPAPI(unsigned char) io_In8P(void* handle, unsigned long offset) { return portio_inpb((unsigned short)(((IO_BASE_t*)handle)->addr + offset)); }