2017-03-07 07:09:52 +00:00
|
|
|
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
#ifndef __BTC_UTIL_H__
|
|
|
|
#define __BTC_UTIL_H__
|
2016-11-04 07:08:30 +00:00
|
|
|
|
2017-03-07 07:09:52 +00:00
|
|
|
#include <stdbool.h>
|
2016-11-04 07:08:30 +00:00
|
|
|
#include "bt_types.h"
|
|
|
|
#include "bt_defs.h"
|
2017-11-24 09:28:43 +00:00
|
|
|
#include "esp_bt_defs.h"
|
2016-11-04 07:08:30 +00:00
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
** Constants & Macros
|
|
|
|
********************************************************************************/
|
|
|
|
#define CASE_RETURN_STR(const) case const: return #const;
|
2017-03-07 07:09:52 +00:00
|
|
|
|
2016-11-04 07:08:30 +00:00
|
|
|
/*******************************************************************************
|
|
|
|
** Type definitions for callback functions
|
|
|
|
********************************************************************************/
|
|
|
|
typedef char bdstr_t[18];
|
|
|
|
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
** Functions
|
|
|
|
********************************************************************************/
|
2016-11-26 05:09:55 +00:00
|
|
|
const char *dump_rc_event(UINT8 event);
|
|
|
|
const char *dump_rc_notification_event_id(UINT8 event_id);
|
|
|
|
const char *dump_rc_pdu(UINT8 pdu);
|
2016-11-04 14:08:12 +00:00
|
|
|
|
2016-11-04 07:08:30 +00:00
|
|
|
UINT32 devclass2uint(DEV_CLASS dev_class);
|
|
|
|
void uint2devclass(UINT32 dev, DEV_CLASS dev_class);
|
2017-11-24 09:28:43 +00:00
|
|
|
void uuid128_be_to_esp_uuid(esp_bt_uuid_t *u, uint8_t* uuid128);
|
2016-11-04 07:08:30 +00:00
|
|
|
|
2018-01-05 08:48:29 +00:00
|
|
|
void uuid_to_string_legacy(bt_uuid_t *p_uuid, char *str);
|
|
|
|
|
2017-03-07 07:09:52 +00:00
|
|
|
#endif /* __BTC_UTIL_H__ */
|