Simulated product dispenser

Dependencies:   HTS221

Fork of mbed-cloud-workshop-connect-HTS221 by Jim Carver

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ns_hal_init.h Source File

ns_hal_init.h

00001 // ----------------------------------------------------------------------------
00002 // Copyright 2016-2017 ARM Ltd.
00003 //
00004 // SPDX-License-Identifier: Apache-2.0
00005 //
00006 // Licensed under the Apache License, Version 2.0 (the "License");
00007 // you may not use this file except in compliance with the License.
00008 // You may obtain a copy of the License at
00009 //
00010 //     http://www.apache.org/licenses/LICENSE-2.0
00011 //
00012 // Unless required by applicable law or agreed to in writing, software
00013 // distributed under the License is distributed on an "AS IS" BASIS,
00014 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015 // See the License for the specific language governing permissions and
00016 // limitations under the License.
00017 // ----------------------------------------------------------------------------
00018 
00019 #ifndef NS_HAL_INIT_H_
00020 #define NS_HAL_INIT_H_
00021 
00022 #include <stddef.h>
00023 #include "nsdynmemLIB.h"
00024 
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028 
00029 /**
00030  * Initialise core Nanostack HAL components.
00031  *
00032  * Calls after the first do nothing. So "major" users should make sure
00033  * they call this first with a "large" heap size, before anyone
00034  * requests a smaller one.
00035  *
00036  * Parameters are as for ns_dyn_mem_init (but note that nsdynmemlib
00037  * currently limits heap size to 16-bit, so be wary of passing large
00038  * sizes.
00039  *
00040  * If heap is NULL, h_size will be allocated from the malloc() heap,
00041  * else the passed-in pointer will be used.
00042  */
00043 void ns_hal_init(void *heap, size_t h_size, void (*passed_fptr)(heap_fail_t), mem_stat_t *info_ptr);
00044 
00045 #ifdef __cplusplus
00046 }
00047 #endif
00048 
00049 #endif /* NS_HAL_INIT_H_ */