-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nimble: Add initial support for CS HCI
- Loading branch information
1 parent
26df457
commit 2392deb
Showing
13 changed files
with
1,615 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you 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 H_BLE_LL_CS | ||
#define H_BLE_LL_CS | ||
|
||
#include <stdint.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/* HCI handlers */ | ||
int ble_ll_cs_hci_rd_loc_supp_cap(uint8_t *rspbuf, uint8_t *rsplen); | ||
int ble_ll_cs_hci_rd_rem_supp_cap(const uint8_t *cmdbuf, uint8_t cmdlen); | ||
int ble_ll_cs_hci_wr_cached_rem_supp_cap(const uint8_t *cmdbuf, uint8_t cmdlen, uint8_t *rspbuf, uint8_t *rsplen); | ||
int ble_ll_cs_hci_sec_enable(const uint8_t *cmdbuf, uint8_t cmdlen); | ||
int ble_ll_cs_hci_set_def_settings(const uint8_t *cmdbuf, uint8_t cmdlen, uint8_t *rspbuf, uint8_t *rsplen); | ||
int ble_ll_cs_hci_rd_rem_fae(const uint8_t *cmdbuf, uint8_t cmdlen); | ||
int ble_ll_cs_hci_wr_cached_rem_fae(const uint8_t *cmdbuf, uint8_t cmdlen, uint8_t *rspbuf, uint8_t *rsplen); | ||
int ble_ll_cs_hci_create_config(const uint8_t *cmdbuf, uint8_t cmdlen); | ||
int ble_ll_cs_hci_remove_config(const uint8_t *cmdbuf, uint8_t cmdlen); | ||
int ble_ll_cs_hci_set_chan_class(const uint8_t *cmdbuf, uint8_t cmdlen, uint8_t *rspbuf, uint8_t *rsplen); | ||
int ble_ll_cs_hci_set_proc_params(const uint8_t *cmdbuf, uint8_t cmdlen, uint8_t *rspbuf, uint8_t *rsplen); | ||
int ble_ll_cs_hci_proc_enable(const uint8_t *cmdbuf, uint8_t cmdlen); | ||
int ble_ll_cs_hci_test(const uint8_t *cmdbuf, uint8_t cmdlen, uint8_t *rspbuf, uint8_t *rsplen); | ||
int ble_ll_cs_hci_test_end(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you 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. | ||
*/ | ||
|
||
#include <syscfg/syscfg.h> | ||
#if MYNEWT_VAL(BLE_LL_CHANNEL_SOUNDING) | ||
#include <stdint.h> | ||
#include "nimble/hci_common.h" | ||
#include "controller/ble_ll_utils.h" | ||
#include "controller/ble_ll.h" | ||
#include "controller/ble_ll_conn.h" | ||
#include "controller/ble_ll_hci.h" | ||
#include "controller/ble_ll_cs.h" | ||
|
||
/* | ||
* Host asked for local CS capabilities. | ||
*/ | ||
int | ||
ble_ll_cs_hci_rd_loc_supp_cap(uint8_t *rspbuf, uint8_t *rsplen) | ||
{ | ||
return BLE_ERR_UNSUPPORTED; | ||
} | ||
|
||
/* | ||
* Host asked to read the remote CS capabilities. | ||
* Start the CS Capabilities Exchange procedure. | ||
*/ | ||
int | ||
ble_ll_cs_hci_rd_rem_supp_cap(const uint8_t *cmdbuf, uint8_t cmdlen) | ||
{ | ||
return BLE_ERR_UNSUPPORTED; | ||
} | ||
|
||
/* | ||
* Host asked to write the cached copy of the CS capabilities | ||
* supported by the remote Controller for the connection. | ||
*/ | ||
int | ||
ble_ll_cs_hci_wr_cached_rem_supp_cap(const uint8_t *cmdbuf, uint8_t cmdlen, | ||
uint8_t *rspbuf, uint8_t *rsplen) | ||
{ | ||
return BLE_ERR_UNSUPPORTED; | ||
} | ||
|
||
/* | ||
* Host asked to enable the CS security. Encryption has to be established | ||
* beforehand. | ||
*/ | ||
int | ||
ble_ll_cs_hci_sec_enable(const uint8_t *cmdbuf, uint8_t cmdlen) | ||
{ | ||
return BLE_ERR_UNSUPPORTED; | ||
} | ||
|
||
/* | ||
* Host asked to set the default settings used for all CS procedures. | ||
*/ | ||
int | ||
ble_ll_cs_hci_set_def_settings(const uint8_t *cmdbuf, uint8_t cmdlen, | ||
uint8_t *rspbuf, uint8_t *rsplen) | ||
{ | ||
return BLE_ERR_UNSUPPORTED; | ||
} | ||
|
||
/* | ||
* Host asked to read the FAE table from the remote controller. | ||
*/ | ||
int | ||
ble_ll_cs_hci_rd_rem_fae(const uint8_t *cmdbuf, uint8_t cmdlen) | ||
{ | ||
return BLE_ERR_UNSUPPORTED; | ||
} | ||
|
||
/* | ||
* Host asked to use the cached FAE table of the remote controller. | ||
*/ | ||
int | ||
ble_ll_cs_hci_wr_cached_rem_fae(const uint8_t *cmdbuf, uint8_t cmdlen, | ||
uint8_t *rspbuf, uint8_t *rsplen) | ||
{ | ||
return BLE_ERR_UNSUPPORTED; | ||
} | ||
|
||
/* | ||
* Host asked to create/update CS config. If the action paramer has been set, | ||
* start the CS Configuration procedure to configure the config in the remote | ||
* controller too. | ||
*/ | ||
int | ||
ble_ll_cs_hci_create_config(const uint8_t *cmdbuf, uint8_t cmdlen) | ||
{ | ||
return BLE_ERR_UNSUPPORTED; | ||
} | ||
|
||
/* | ||
* Host asked to remove a CS config. If the action paramer has been set, | ||
* start the CS Configuration procedure to remove the config from | ||
* the remote controller too. | ||
*/ | ||
int | ||
ble_ll_cs_hci_remove_config(const uint8_t *cmdbuf, uint8_t cmdlen) | ||
{ | ||
return BLE_ERR_UNSUPPORTED; | ||
} | ||
|
||
/* | ||
* Host asked to set the channel classification | ||
* (i.e. to enable physical channels for CS procedures). | ||
*/ | ||
int | ||
ble_ll_cs_hci_set_chan_class(const uint8_t *cmdbuf, uint8_t cmdlen, | ||
uint8_t *rspbuf, uint8_t *rsplen) | ||
{ | ||
return BLE_ERR_UNSUPPORTED; | ||
} | ||
|
||
/* | ||
* Host asked to set the scheduling parameters for a CS procedure. | ||
*/ | ||
int | ||
ble_ll_cs_hci_set_proc_params(const uint8_t *cmdbuf, uint8_t cmdlen, | ||
uint8_t *rspbuf, uint8_t *rsplen) | ||
{ | ||
return BLE_ERR_UNSUPPORTED; | ||
} | ||
|
||
/* | ||
* Host asked to enable or disable the scheduling of CS procedures. | ||
*/ | ||
int | ||
ble_ll_cs_hci_proc_enable(const uint8_t *cmdbuf, uint8_t cmdlen) | ||
{ | ||
return BLE_ERR_UNSUPPORTED; | ||
} | ||
|
||
int | ||
ble_ll_cs_hci_test(const uint8_t *cmdbuf, uint8_t cmdlen, | ||
uint8_t *rspbuf, uint8_t *rsplen) | ||
{ | ||
return BLE_ERR_UNSUPPORTED; | ||
} | ||
|
||
int | ||
ble_ll_cs_hci_test_end(void) | ||
{ | ||
return BLE_ERR_UNSUPPORTED; | ||
} | ||
|
||
#endif /* BLE_LL_CHANNEL_SOUNDING */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.