mem.h

Go to the documentation of this file.
00001 /*
00002 # This file is Copyright 2003, 2006, 2007, 2009 Dean Hall.
00003 #
00004 # This file is part of the PyMite VM.
00005 # The PyMite VM is free software: you can redistribute it and/or modify
00006 # it under the terms of the GNU GENERAL PUBLIC LICENSE Version 2.
00007 #
00008 # The PyMite VM is distributed in the hope that it will be useful,
00009 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00011 # A copy of the GNU GENERAL PUBLIC LICENSE Version 2
00012 # is seen in the file COPYING in this directory.
00013 */
00014 
00015 
00016 #ifndef __MEM_H__
00017 #define __MEM_H__
00018 
00019 
00033 typedef enum PmMemSpace_e
00034 {
00035     MEMSPACE_RAM = 0,
00036     MEMSPACE_PROG,
00037     MEMSPACE_EEPROM,
00038     MEMSPACE_SEEPROM,
00039     MEMSPACE_OTHER0,
00040     MEMSPACE_OTHER1,
00041     MEMSPACE_OTHER2,
00042     MEMSPACE_OTHER3
00043 } PmMemSpace_t, *pPmMemSpace_t;
00044 
00045 
00057 #define mem_getByte(memspace, paddr) plat_memGetByte((memspace), (paddr))
00058 
00070 uint16_t mem_getWord(PmMemSpace_t memspace, uint8_t const **paddr);
00071 
00083 uint32_t mem_getInt(PmMemSpace_t memspace, uint8_t const **paddr);
00084 
00085 #ifdef HAVE_FLOAT
00086 
00097 float mem_getFloat(PmMemSpace_t memspace, uint8_t const **paddr);
00098 #endif /* HAVE_FLOAT */
00099 
00112 void mem_copy(PmMemSpace_t memspace,
00113               uint8_t **pdest, uint8_t const **psrc, uint16_t count);
00114 
00123 uint16_t mem_getStringLength(PmMemSpace_t memspace,
00124                              uint8_t const *const pstr);
00125 
00135 PmReturn_t mem_cmpn(uint8_t *cname, uint8_t cnamelen, PmMemSpace_t memspace,
00136                     uint8_t const **paddr);
00137 
00138 #endif /* __MEM_H__ */

Generated on Wed Feb 24 13:37:02 2010 for Python-on-a-chip by  doxygen 1.5.9