[49a40165] | 1 | /*--------------------------------------------------------------------------------- |
---|
| 2 | $Id$ |
---|
| 3 | |
---|
| 4 | key input code -- provides slightly higher level input forming |
---|
| 5 | |
---|
| 6 | Copyright (C) 2005 |
---|
| 7 | Michael Noland (joat) |
---|
| 8 | Jason Rogers (dovoto) |
---|
| 9 | Dave Murphy (WinterMute) |
---|
| 10 | |
---|
| 11 | This software is provided 'as-is', without any express or implied |
---|
| 12 | warranty. In no event will the authors be held liable for any |
---|
| 13 | damages arising from the use of this software. |
---|
| 14 | |
---|
| 15 | Permission is granted to anyone to use this software for any |
---|
| 16 | purpose, including commercial applications, and to alter it and |
---|
| 17 | redistribute it freely, subject to the following restrictions: |
---|
| 18 | |
---|
| 19 | 1. The origin of this software must not be misrepresented; you |
---|
| 20 | must not claim that you wrote the original software. If you use |
---|
| 21 | this software in a product, an acknowledgment in the product |
---|
| 22 | documentation would be appreciated but is not required. |
---|
| 23 | 2. Altered source versions must be plainly marked as such, and |
---|
| 24 | must not be misrepresented as being the original software. |
---|
| 25 | 3. This notice may not be removed or altered from any source |
---|
| 26 | distribution. |
---|
| 27 | |
---|
| 28 | ---------------------------------------------------------------------------------*/ |
---|
| 29 | /*! \file cache.h |
---|
| 30 | \brief ARM9 cache control functions. |
---|
| 31 | |
---|
| 32 | */ |
---|
| 33 | #ifndef _cache_h_ |
---|
| 34 | #define _cache_h_ |
---|
| 35 | |
---|
| 36 | #ifdef __cplusplus |
---|
| 37 | extern "C" { |
---|
| 38 | #endif |
---|
| 39 | |
---|
| 40 | #include "nds/jtypes.h" |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | /*! \fn IC_InvalidateAll(void) |
---|
| 44 | \brief invalidate entire instruction cache. |
---|
| 45 | */ |
---|
| 46 | void IC_InvalidateAll(void); |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | /*! \fn IC_InvalidateRange(const void *base, u32 size) |
---|
| 50 | \brief invalidate the instruction cache for a range of addresses. |
---|
| 51 | \param base base address of the region to invalidate |
---|
| 52 | \param size size of the region to invalidate. |
---|
| 53 | */ |
---|
| 54 | void IC_InvalidateRange(const void *base, u32 size); |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | /*! \fn DC_FlushAll(void) |
---|
| 58 | \brief flush the entire data cache to memory. |
---|
| 59 | */ |
---|
| 60 | void DC_FlushAll(void); |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | /*! \fn DC_FlushRange(const void *base, u32 size) |
---|
| 64 | \brief flush the data cache for a range of addresses to memory. |
---|
| 65 | \param base base address of the region to flush. |
---|
| 66 | \param size size of the region to flush. |
---|
| 67 | */ |
---|
| 68 | void DC_FlushRange(const void *base, u32 size); |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | /*! \fn DC_InvalidateAll(void) |
---|
| 72 | \brief invalidate the entire data cache. |
---|
| 73 | */ |
---|
| 74 | void DC_InvalidateAll(void); |
---|
| 75 | |
---|
| 76 | |
---|
| 77 | /*! \fn DC_InvalidateRange(const void *base, u32 size) |
---|
| 78 | \brief invalidate the data cache for a range of addresses. |
---|
| 79 | \param base base address of the region to invalidate |
---|
| 80 | \param size size of the region to invalidate. |
---|
| 81 | */ |
---|
| 82 | void DC_InvalidateRange(const void *base, u32 size); |
---|
| 83 | |
---|
| 84 | #ifdef __cplusplus |
---|
| 85 | } |
---|
| 86 | #endif |
---|
| 87 | |
---|
| 88 | #endif |
---|