Main Page   Modules   Data Structures   File List   Globals  

memory.h File Reference

Header file for memory.c. More...

#include "types.h"

Go to the source code of this file.

Typedefs

typedef uint16_t otos_size_t

Functions

void * otosAllocate (otos_size_t size)
 Allocate memory from system heap.

void * otosAllocateBanked (otos_size_t size, uint8_t bank)
 Allocate memory from memory bank.

otos_size_t otosGetFreeHeap (void)
 Returns the number of free bytes in the heap.

void otosSetRamBank (uint8_t bank)
 Set RAM bank for external RAM.

uint8_t otosGetRamBank (void)
 Get active RAM bank.


Detailed Description

Header file for memory.c.

Definition in file memory.h.


Function Documentation

void* otosAllocate otos_size_t    size
 

Allocate memory from system heap.

Parameters:
size Number of bytes to allocate
Returns:
Pointer to allocated memory, or NULL if there is not enough memory free.

Definition at line 150 of file memory.c.

Referenced by otosCreateMainTask(), otosCreateMessageQueue(), and otosCreateTask().

void* otosAllocateBanked otos_size_t    size,
uint8_t    bank
 

Allocate memory from memory bank.

Parameters:
size Number of bytes to allocate
bank RAM bank
Returns:
Pointer to allocated memory, or NULL if there is not enough memory free.

Definition at line 245 of file memory.c.

otos_size_t otosGetFreeHeap void   
 

Returns the number of free bytes in the heap.

Returns:
Number of free bytes in heap

Definition at line 190 of file memory.c.

uint8_t otosGetRamBank void    [inline]
 

Get active RAM bank.

Returns:
Number of RAM bank [0..NUMBER_OF_BANKS]

Definition at line 229 of file memory.c.

void otosSetRamBank uint8_t    bank [inline]
 

Set RAM bank for external RAM.

Parameters:
bank Number of bank [0..NUMBER_OF_BANKS]

Definition at line 216 of file memory.c.

Referenced by main().


Generated on Sat Jan 25 18:41:43 2003 for otOS by doxygen1.3-rc2