nimble/ll: Add support for PA/LNA

This adds some definitions for PA/LNA support. The actual support is
implemented in phy and front-end driver.
This commit is contained in:
Andrzej Kaczmarek
2022-01-18 14:53:27 +01:00
parent c13d0b478b
commit 05538bc66d
4 changed files with 77 additions and 0 deletions
@@ -0,0 +1,45 @@
/*
* 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_PLNA_
#define H_BLE_LL_PLNA_
#ifdef __cplusplus
extern "C" {
#endif
#include "syscfg/syscfg.h"
#if MYNEWT_VAL(BLE_LL_PA)
void ble_ll_plna_pa_init(void);
void ble_ll_plna_pa_enable(void);
void ble_ll_plna_pa_disable(void);
#endif
#if MYNEWT_VAL(BLE_LL_LNA)
void ble_ll_plna_lna_init(void);
void ble_ll_plna_lna_enable(void);
void ble_ll_plna_lna_disable(void);
#endif
#ifdef __cplusplus
}
#endif
#endif /* H_BLE_LL_PLNA_ */
+4
View File
@@ -29,6 +29,10 @@ pkg.req_apis:
- ble_driver
- ble_transport
- stats
pkg.req_apis.BLE_LL_PA:
- ble_ll_pa
pkg.req_apis.BLE_LL_LNA:
- ble_ll_lna
pkg.deps:
- "@apache-mynewt-core/kernel/os"
+9
View File
@@ -44,6 +44,7 @@
#include "controller/ble_ll_rfmgmt.h"
#include "controller/ble_ll_trace.h"
#include "controller/ble_ll_sync.h"
#include "controller/ble_ll_plna.h"
#include "ble_ll_conn_priv.h"
#include "ble_ll_hci_priv.h"
#include "ble_ll_priv.h"
@@ -1656,6 +1657,14 @@ ble_ll_reset(void)
ble_ll_resolv_list_reset();
#endif
#if MYNEWT_VAL(BLE_LL_PA)
ble_ll_plna_pa_init();
#endif
#if MYNEWT_VAL(BLE_LL_LNA)
ble_ll_plna_lna_init();
#endif
/* Re-initialize the PHY */
rc = ble_phy_init();
+19
View File
@@ -375,6 +375,23 @@ syscfg.defs:
line number where assertion occured.
value: 0
BLE_LL_PA:
description: Enable PA support
value: 0
BLE_LL_PA_GPIO:
description: >
GPIO pin number to control PA. Pin is set to high state when PA
should be enabled.
value: -1
BLE_LL_LNA:
description: Enable LNA support
value: 0
BLE_LL_LNA_GPIO:
description: >
GPIO pin number to control LNA. Pin is set to high state when LNA
should be enabled.
value: -1
BLE_LL_SYSINIT_STAGE:
description: >
Sysinit stage for the NimBLE controller.
@@ -499,3 +516,5 @@ syscfg.vals.!BLE_HOST:
syscfg.restrictions:
- OS_CPUTIME_FREQ == 32768
- BLE_LL_PUBLIC_DEV_ADDR <= 0xffffffffffff
- BLE_LL_PA == 0 || BLE_LL_PA_GPIO >= 0
- BLE_LL_LNA == 0 || BLE_LL_LNA_GPIO >= 0