2016-11-24 17:58:26 +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.
|
|
|
|
|
2016-11-16 14:11:59 +00:00
|
|
|
#ifndef __BLUFI_INT_H__
|
|
|
|
#define __BLUFI_INT_H__
|
|
|
|
|
|
|
|
//define the blufi serivce uuid
|
2016-11-24 18:10:15 +00:00
|
|
|
#define SVC_BLUFI_UUID 0xFFFF
|
2016-11-16 14:11:59 +00:00
|
|
|
//define the blufi Char uuid
|
2016-11-24 18:10:15 +00:00
|
|
|
#define CHAR_BLUFI_UUID 0xFF01
|
2016-11-16 14:11:59 +00:00
|
|
|
|
2016-11-24 18:10:15 +00:00
|
|
|
#define BLUFI_HDL_NUM 4
|
2016-11-16 14:11:59 +00:00
|
|
|
|
2016-11-24 18:10:15 +00:00
|
|
|
#define BLUFI_VAL_MAX_LEN (128)
|
2016-11-16 14:11:59 +00:00
|
|
|
|
|
|
|
#define BLUFI_MAX_STRING_DATA 128
|
|
|
|
|
|
|
|
|
2016-11-24 18:10:15 +00:00
|
|
|
typedef struct {
|
2016-11-16 14:11:59 +00:00
|
|
|
UINT8 app_id;
|
|
|
|
UINT16 blufi_hdl;
|
2016-11-24 18:10:15 +00:00
|
|
|
} tBLUFI_INST;
|
2016-11-16 14:11:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* service engine control block */
|
2016-11-24 18:10:15 +00:00
|
|
|
typedef struct {
|
2016-11-16 14:11:59 +00:00
|
|
|
BOOLEAN enabled;
|
2016-11-24 18:10:15 +00:00
|
|
|
BOOLEAN is_primery;
|
2016-11-16 14:11:59 +00:00
|
|
|
UINT8 inst_id;
|
|
|
|
tGATT_IF gatt_if;
|
2016-11-24 18:10:15 +00:00
|
|
|
tBLUFI_INST blufi_inst;
|
|
|
|
BOOLEAN in_use;
|
|
|
|
BOOLEAN congest;
|
|
|
|
UINT16 conn_id;
|
|
|
|
BOOLEAN connected;
|
|
|
|
BD_ADDR remote_bda;
|
|
|
|
UINT32 trans_id;
|
|
|
|
UINT8 cur_srvc_id;
|
2016-11-16 14:11:59 +00:00
|
|
|
} tBLUFI_CB_ENV;
|
|
|
|
|
|
|
|
#endif /* __BLUFI_INT_H__ */
|