|
|
@ -1,15 +1,16 @@ |
|
|
#ifndef __MEMORY_H__ |
|
|
#ifndef __MEMORY_H__ |
|
|
#define __MEMORY_H__ |
|
|
#define __MEMORY_H__ |
|
|
|
|
|
|
|
|
|
|
|
extern char* const scratchpad; // Starting address of scratchpad memory |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @brief Allocate memory in the fast scratchpad RAM buffer. |
|
|
* @brief Allocate memory in the fast scratchpad RAM buffer. |
|
|
* |
|
|
* |
|
|
|
|
|
* @param scratch_offset Pointer to a variable holding the current offset position in scratch memory. |
|
|
* @param size The number of bytes to allocate. Be aware that the scratchpad memory only has 1024 bytes available. |
|
|
* @param size The number of bytes to allocate. Be aware that the scratchpad memory only has 1024 bytes available. |
|
|
* @return Pointer to the allocated buffer in scratchpad memory. |
|
|
* @return Pointer to the allocated buffer in scratchpad memory. |
|
|
*/ |
|
|
*/ |
|
|
void *mem_scratch(unsigned short size); |
|
|
|
|
|
|
|
|
|
|
|
void mem_scratch_reset(); |
|
|
|
|
|
|
|
|
void *mem_scratch(char **scratch_offset, unsigned short size); |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @brief Allocate a single primitive in the primitive buffer. |
|
|
* @brief Allocate a single primitive in the primitive buffer. |
|
|
|