#ifndef	MBASE_H
#define	MBASE_H

#include <../source/TAL/objbase.h>
#include <../source/vfs/iobase.h>

typedef struct io_section_s
{
	ioport_base_t	vtbl;
	u32_t			size, ptr;
	u8_t			*base;
}	io_section_t, *io_section_p;

#ifdef	__cplusplus
extern "C" {
#endif	/* __cplusplus */
	/*
	 * One of the most useful (and widely used) routines.
	 *
	 * Creates 'unnamed section' object and returns handle for use
	 * with fileXXXX calls. Handle mast be closed with fileClose().
	 *
	 * Note: block of data not duplicated (mmap_base must be valid
	 * until handle is closed).
	 */
	io_section_p V_CALL	ioAllocSection(u32_t
		real_port_size,	/* amount of bytes to allocate */
		void *mmap_base,
		u32_t mmap_size);
#ifdef	__cplusplus
}
#endif	/* __cplusplus */

#endif	/* MBASE_H */
