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_STORAGE_H__
|
|
|
|
#define __BTC_STORAGE_H__
|
2017-01-19 09:11:01 +00:00
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "bt_defs.h"
|
|
|
|
#include "bt_types.h"
|
2017-03-07 07:09:52 +00:00
|
|
|
|
2017-01-19 09:11:01 +00:00
|
|
|
/*******************************************************************************
|
|
|
|
**
|
2017-03-07 07:09:52 +00:00
|
|
|
** Function btc_storage_add_bonded_device
|
2017-01-19 09:11:01 +00:00
|
|
|
**
|
2017-03-07 07:33:05 +00:00
|
|
|
** Description BTC storage API - Adds the newly bonded device to NVRAM
|
2017-01-19 09:11:01 +00:00
|
|
|
** along with the link-key, Key type and Pin key length
|
|
|
|
**
|
|
|
|
** Returns BT_STATUS_SUCCESS if the store was successful,
|
|
|
|
** BT_STATUS_FAIL otherwise
|
|
|
|
**
|
|
|
|
*******************************************************************************/
|
2017-03-07 07:09:52 +00:00
|
|
|
bt_status_t btc_storage_add_bonded_device(bt_bdaddr_t *remote_bd_addr,
|
2017-01-19 09:11:01 +00:00
|
|
|
LINK_KEY link_key,
|
|
|
|
uint8_t key_type,
|
|
|
|
uint8_t pin_length);
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
**
|
2017-03-07 07:09:52 +00:00
|
|
|
** Function btc_storage_remove_bonded_device
|
2017-01-19 09:11:01 +00:00
|
|
|
**
|
2017-03-07 07:33:05 +00:00
|
|
|
** Description BTC storage API - Deletes the bonded device from NVRAM
|
2017-01-19 09:11:01 +00:00
|
|
|
**
|
|
|
|
** Returns BT_STATUS_SUCCESS if the deletion was successful,
|
|
|
|
** BT_STATUS_FAIL otherwise
|
|
|
|
**
|
|
|
|
*******************************************************************************/
|
2017-03-07 07:09:52 +00:00
|
|
|
bt_status_t btc_storage_remove_bonded_device(bt_bdaddr_t *remote_bd_addr);
|
2017-01-19 09:11:01 +00:00
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
**
|
2017-03-07 07:09:52 +00:00
|
|
|
** Function btc_storage_remove_bonded_device
|
2017-01-19 09:11:01 +00:00
|
|
|
**
|
2017-03-07 07:33:05 +00:00
|
|
|
** Description BTC storage API - Deletes the bonded device from NVRAM
|
2017-01-19 09:11:01 +00:00
|
|
|
**
|
|
|
|
** Returns BT_STATUS_SUCCESS if the deletion was successful,
|
|
|
|
** BT_STATUS_FAIL otherwise
|
|
|
|
**
|
|
|
|
*******************************************************************************/
|
2017-03-07 07:09:52 +00:00
|
|
|
bt_status_t btc_storage_load_bonded_devices(void);
|
2017-01-19 09:11:01 +00:00
|
|
|
|
2017-03-07 07:09:52 +00:00
|
|
|
#endif /* BTC_STORAGE_H */
|