00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __OSKA_IO_H
00010 #define __OSKA_IO_H
00011
00012 #ifdef __OSKA_API_DOC
00013
00025 typedef implementation_defined os_io_mem_t;
00026
00027 uint8_t os_io_read8(os_io_mem_t base, unsigned offset);
00028 uint16_t os_io_read16(os_io_mem_t base, unsigned offset);
00029 uint32_t os_io_read32(os_io_mem_t base, unsigned offset);
00030 uint64_t os_io_read64(os_io_mem_t base, unsigned offset);
00031
00032 void os_io_write8(os_io_mem_t base, unsigned offset, uint8_t val);
00033 void os_io_write16(os_io_mem_t base, unsigned offset, uint16_t val);
00034 void os_io_write32(os_io_mem_t base, unsigned offset, uint32_t val);
00035 void os_io_write64(os_io_mem_t base, unsigned offset, uint64_t val);
00036
00046 void os_io_memory_barrier(void);
00047
00048 #endif
00049
00050 #ifdef linux
00051 # include <../linux/io.h>
00052 #elif defined(KMDF_MAJOR_VERSION)
00053 # include <../windows/kmdf/io.h>
00054 #else
00055 # error <oska/io.h> not provided for this OS
00056 #endif
00057
00058 #endif