Add io helper functions
This commit is contained in:
6
sw/io.c
Normal file
6
sw/io.c
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#include <io.h>
|
||||||
|
|
||||||
|
int io_remap(int region) {
|
||||||
|
*(unsigned char*)IO_REMAP = region;
|
||||||
|
return (*(unsigned char*)IO_REMAP == region);
|
||||||
|
}
|
||||||
11
sw/io.h
11
sw/io.h
@@ -1,6 +1,15 @@
|
|||||||
#ifndef _IO_H
|
#ifndef _IO_H
|
||||||
#define IO_H
|
#define IO_H
|
||||||
|
|
||||||
#define IO_REMAP *(unsigned char*)0x7f00
|
|
||||||
|
#define IO_REMAP 0x7f00
|
||||||
|
|
||||||
|
|
||||||
|
enum io_regions {
|
||||||
|
io_region_de10lite = 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
int io_remap(int region);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user