Rtos API example

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ns_hal_init.h Source File

ns_hal_init.h

00001 /*
00002  * Copyright (c) 2016 ARM Limited, All Rights Reserved
00003  */
00004 
00005 #ifndef NS_HAL_INIT_H_
00006 #define NS_HAL_INIT_H_
00007 
00008 #include <stddef.h>
00009 #include "nsdynmemLIB.h"
00010 
00011 #ifdef __cplusplus
00012 extern "C" {
00013 #endif
00014 
00015 /**
00016  * Initialise core Nanostack HAL components.
00017  *
00018  * Calls after the first do nothing. So "major" users should make sure
00019  * they call this first with a "large" heap size, before anyone
00020  * requests a smaller one.
00021  *
00022  * Parameters are as for ns_dyn_mem_init (but note that nsdynmemlib
00023  * currently limits heap size to 16-bit, so be wary of passing large
00024  * sizes.
00025  *
00026  * If heap is NULL, h_size will be allocated from the malloc() heap,
00027  * else the passed-in pointer will be used.
00028  */
00029 void ns_hal_init(void *heap, size_t h_size, void (*passed_fptr)(heap_fail_t), mem_stat_t *info_ptr);
00030 
00031 #ifdef __cplusplus
00032 }
00033 #endif
00034 
00035 #endif /* NS_HAL_INIT_H_ */