00001 /******************************************************** 00002 *File : memory.h 00003 *Author : Vegard Endresen 00004 *Description : Header for memory allocation kernel. 00005 - Changes by Sindre Hansen (2011): 00006 - Naming of functions. 00007 *********************************************************/ 00008 00009 #ifndef HMEM_H 00010 #define HMEM_H 00011 00012 /*Public functions, can be reduced as not all are neccessary*/ 00013 00014 int hmem_allocate(int size, int *addr); 00015 void hmem_free(int id); 00016 00017 void hmem_init(int bram_size); 00018 void hmem_cleanup(); 00019 00020 int hmem_instruction_write(int id,char *buf,int size); 00021 int hmem_data_write(int id,char *buf,int addr,int size); 00022 int hmem_data_read(int id, char *buf,int addr,int size); 00023 00024 #endif 00025