1 /*-------------------------------------------------------------
4 arqmgr.h -- ARAM task queue management
7 Michael Wiedenbauer (shagkur)
8 Dave Murphy (WinterMute)
10 This software is provided 'as-is', without any express or implied
11 warranty. In no event will the authors be held liable for any
12 damages arising from the use of this software.
14 Permission is granted to anyone to use this software for any
15 purpose, including commercial applications, and to alter it and
16 redistribute it freely, subject to the following restrictions:
18 1. The origin of this software must not be misrepresented; you
19 must not claim that you wrote the original software. If you use
20 this software in a product, an acknowledgment in the product
21 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.
26 3. This notice may not be removed or altered from any source
30 -------------------------------------------------------------*/
39 * \brief ARAM queue managemnt subsystem
48 #endif /* __cplusplus */
52 * \typedef void (*ARQMCallback)()
53 * \brief function pointer typedef for the user's callback when ARAM operation has completed
56 typedef void (*ARQMCallback
)(s32 result
);
60 * \fn void ARQM_Init(u32 arambase,s32 len)
61 * \brief Initialize the ARAM queue management system
63 * \param[in] arambase ARAM startaddress to take for the queue stack
64 * \param[in] len maximum amount of memory to be reserved from the ARAM for the queue management
68 void ARQM_Init(u32 arambase
,s32 len
);
72 * \fn u32 ARQM_PushData(void *buff,s32 len)
73 * \brief Push the data onto the ARAM queue
75 * \param[in] buff startaddress of buffer to be pushed onto the queue. <b><i>NOTE:</i></b> Must be 32-bytealigned.
76 * \param[in] len length of data to be pushed onto the queue.
80 u32
ARQM_PushData(void *buffer
,s32 len
);
84 * \fn u32 ARQM_GetZeroBuffer()
85 * \brief Returns ARAM address of 'zero buffer'
87 * \return See description
89 u32
ARQM_GetZeroBuffer();
93 * \fn u32 ARQM_GetStackPointer()
94 * \brief Return the ARAM address of the next free stack pointer
96 * \return See description
98 u32
ARQM_GetStackPointer();
102 * \fn u32 ARQM_GetFreeSize()
103 * \brief Return Returns remaining number of bytes on stack
105 * \return See description
107 u32
ARQM_GetFreeSize();
111 #endif /* __cplusplus */