2 * Open Adaptation Layer (OAL)
4 * Copyright (c) 2014-2015 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.
22 #include <sys/types.h>
27 #include <tzplatform_config.h>
29 #include "oal-hardware.h"
30 #include "oal-manager.h"
31 #include "oal-internal.h"
33 #define MAX_LINE_SIZE 256
34 #define MAX_STRING_SIZE 128
36 static bt_chip_type_t try_get_chip_type(void);
38 static bt_chip_type_t bt_chip_type = BT_CHIP_TYPE_PLATFORM;
40 const unsigned int nBTVidPidArry[][3] = { /**< list of BT dongle's vid, pid */
41 /* { Vendor ID, Product ID, Chip Vendor } */
42 {0x0000, 0x0001, BT_CHIP_TYPE_PLATFORM}, /* Tizen Platform BT Chip */
45 static const char *str_chip_type[] = {
46 FOREACH_TYPE(GENERATE_TYPE_STRING)
49 int hw_is_chip_connected()
51 /* Currently not supported, return TRUE as default */
55 bt_chip_type_t hw_get_chip_type(void)
59 type = ((bt_chip_type != BT_CHIP_TYPE_UNKNOWN) ? bt_chip_type : try_get_chip_type());
61 API_TRACE("Type: %s", str_chip_type[type]);
65 oal_status_t hw_chip_firmware_update(void)
67 return OAL_STATUS_NOT_SUPPORT;
70 oal_status_t hw_is_module_ready(void)
72 /* For Tizen Platform, set HW module ready to TRUE by default */
73 return OAL_STATUS_SUCCESS;
76 oal_status_t hw_is_fwupgrade_required(gboolean *is_required)
78 return OAL_STATUS_NOT_SUPPORT;
81 static bt_chip_type_t try_get_chip_type(void)