Microchip® Advanced Software Framework

memory.h File Reference

Memory allocation for event.

Copyright (c) 2018 Microchip Technology Inc. and its subsidiaries.

Macros

#define EVENT_DATA_LEN_HIGH_SIZE   1
 
#define EVENT_DATA_LEN_HIGH_START   (EVENT_ID_START + EVENT_ID_SIZE)
 
#define EVENT_DATA_LEN_LOW_SIZE   1
 
#define EVENT_DATA_LEN_LOW_START   (EVENT_DATA_LEN_HIGH_START + EVENT_DATA_LEN_HIGH_SIZE)
 
#define EVENT_ID_SIZE   1
 
#define EVENT_ID_START   0
 

Enumerations

enum  {
  MEM_DEALLOC_SUCCESS,
  MEM_DEALLOC_FAILURE,
  MEM_INVALID_ADDRESS
}
 

Functions

void * mem_alloc (uint32_t size)
 
uint8_t mem_free (void *ptr, uint32_t size)
 
void mem_init (uint8_t *base_addr, uint32_t size)
 

#define EVENT_DATA_LEN_HIGH_SIZE   1
#define EVENT_DATA_LEN_HIGH_START   (EVENT_ID_START + EVENT_ID_SIZE)
#define EVENT_DATA_LEN_LOW_SIZE   1
#define EVENT_DATA_LEN_LOW_START   (EVENT_DATA_LEN_HIGH_START + EVENT_DATA_LEN_HIGH_SIZE)
#define EVENT_ID_SIZE   1
#define EVENT_ID_START   0

anonymous enum
Enumerator
MEM_DEALLOC_SUCCESS 
MEM_DEALLOC_FAILURE 
MEM_INVALID_ADDRESS 

void* mem_alloc ( uint32_t  size)

References head, mem_pool_base_addr, mem_pool_size, NULL, and tail.

Referenced by event_fifo_write().

uint8_t mem_free ( void *  ptr,
uint32_t  size 
)
void mem_init ( uint8_t *  base_addr,
uint32_t  size 
)

References head, mem_pool_base_addr, mem_pool_size, and tail.

Referenced by interface_init(), and lwip_init().