2 * HAL (Hardware Abstract Layer) ZIGBEE API
4 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the License);
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
24 #include <hal/hal-common.h>
26 #include "hal-zigbee-interface.h"
27 #include "hal-zigbee.h"
31 #define EXPORT __attribute__ ((visibility("default")))
34 #define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
36 static hal_backend_zigbee_funcs *g_zigbee_funcs = NULL;
39 int hal_zigbee_get_backend(void)
46 ret = hal_common_get_backend(HAL_MODULE_ZIGBEE, (void **)&g_zigbee_funcs);
48 _E("Failed to get backend\n");
56 int hal_zigbee_put_backend(void)
63 ret = hal_common_put_backend(HAL_MODULE_ZIGBEE, (void *)g_zigbee_funcs);
65 _E("Failed to put backend\n");
68 g_zigbee_funcs = NULL;
74 int hal_zigbee_get_descriptor(void *descriptor)
78 return g_zigbee_funcs->get_descriptor(descriptor);