|
| 1 | +From 46653cb9d8015361327cb0a8f9b394d6c008c841 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Martino Facchin <m.facchin@arduino.cc> |
| 3 | +Date: Thu, 26 Oct 2023 16:39:59 +0200 |
| 4 | +Subject: [PATCH 212/213] ble: remove stray specializations |
| 5 | + |
| 6 | +the standard one from Cypress driver is fine |
| 7 | +--- |
| 8 | + .../TARGET_NICLA_VISION/cy_bt_cordio_cfg.cpp | 105 ------------------ |
| 9 | + .../TARGET_PORTENTA_H7/cy_bt_cordio_cfg.cpp | 105 ------------------ |
| 10 | + 2 files changed, 210 deletions(-) |
| 11 | + delete mode 100644 connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/TARGET_NICLA_VISION/cy_bt_cordio_cfg.cpp |
| 12 | + delete mode 100644 connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/TARGET_PORTENTA_H7/cy_bt_cordio_cfg.cpp |
| 13 | + |
| 14 | +diff --git a/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/TARGET_NICLA_VISION/cy_bt_cordio_cfg.cpp b/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/TARGET_NICLA_VISION/cy_bt_cordio_cfg.cpp |
| 15 | +deleted file mode 100644 |
| 16 | +index 2d668fed9c..0000000000 |
| 17 | +--- a/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/TARGET_NICLA_VISION/cy_bt_cordio_cfg.cpp |
| 18 | ++++ /dev/null |
| 19 | +@@ -1,105 +0,0 @@ |
| 20 | +-/******************************************************************************* |
| 21 | +-* \file cy_bt_cordio_cfg.cpp |
| 22 | +-* \version 1.0 |
| 23 | +-* |
| 24 | +-* |
| 25 | +-* Low Power Assist BT Pin configuration implementation. |
| 26 | +-* |
| 27 | +-******************************************************************************** |
| 28 | +-* \copyright |
| 29 | +-* Copyright 2019 Cypress Semiconductor Corporation |
| 30 | +-* SPDX-License-Identifier: Apache-2.0 |
| 31 | +-* |
| 32 | +-* Licensed under the Apache License, Version 2.0 (the "License"); |
| 33 | +-* you may not use this file except in compliance with the License. |
| 34 | +-* You may obtain a copy of the License at |
| 35 | +-* |
| 36 | +-* http://www.apache.org/licenses/LICENSE-2.0 |
| 37 | +-* |
| 38 | +-* Unless required by applicable law or agreed to in writing, software |
| 39 | +-* distributed under the License is distributed on an "AS IS" BASIS, |
| 40 | +-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 41 | +-* See the License for the specific language governing permissions and |
| 42 | +-* limitations under the License. |
| 43 | +-*******************************************************************************/ |
| 44 | +- |
| 45 | +-#include <stdio.h> |
| 46 | +-#include "ble/driver/CordioHCIDriver.h" |
| 47 | +-#include "hci_api.h" |
| 48 | +-#include "hci_cmd.h" |
| 49 | +-#include "hci_core.h" |
| 50 | +-#include "bstream.h" |
| 51 | +-#include "assert.h" |
| 52 | +-#include <stdbool.h> |
| 53 | +-#include "hci_mbed_os_adaptation.h" |
| 54 | +-#include "CyH4TransportDriver.h" |
| 55 | +- |
| 56 | +-#define cyhal_gpio_to_rtos(x) (x) |
| 57 | +-#define CYCFG_BT_LP_ENABLED (1) |
| 58 | +-#define CYCFG_BT_HOST_WAKE_IRQ_EVENT WAKE_EVENT_ACTIVE_LOW |
| 59 | +-#define CYCFG_BT_DEV_WAKE_POLARITY WAKE_EVENT_ACTIVE_LOW |
| 60 | +- |
| 61 | +-/******************************************************************************* |
| 62 | +-* Function Name: ble_cordio_get_h4_transport_driver |
| 63 | +-******************************************************************************** |
| 64 | +-* |
| 65 | +-* Strong implementation of function which calls CyH4TransportDriver constructor and return it |
| 66 | +-* |
| 67 | +-* \param none |
| 68 | +-* |
| 69 | +-* \return |
| 70 | +-* Returns the transport driver object |
| 71 | +-*******************************************************************************/ |
| 72 | +-ble::vendor::cypress_ble::CyH4TransportDriver& ble_cordio_get_h4_transport_driver() |
| 73 | +-{ |
| 74 | +-#if (defined(MBED_TICKLESS) && DEVICE_SLEEP && DEVICE_LPTICKER) |
| 75 | +- |
| 76 | +-#if (defined(CYCFG_BT_LP_ENABLED)) |
| 77 | +- if (CYCFG_BT_LP_ENABLED) { |
| 78 | +- static ble::vendor::cypress_ble::CyH4TransportDriver s_transport_driver( |
| 79 | +- /* TX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_TX), |
| 80 | +- /* RX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RX), |
| 81 | +- /* cts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_CTS), |
| 82 | +- /* rts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RTS), |
| 83 | +- /* power */ cyhal_gpio_to_rtos(CYBSP_BT_POWER), |
| 84 | +- DEF_BT_BAUD_RATE, |
| 85 | +- cyhal_gpio_to_rtos(CYBSP_BT_HOST_WAKE), |
| 86 | +- cyhal_gpio_to_rtos(CYBSP_BT_DEVICE_WAKE), |
| 87 | +- CYCFG_BT_HOST_WAKE_IRQ_EVENT, |
| 88 | +- CYCFG_BT_DEV_WAKE_POLARITY |
| 89 | +- ); |
| 90 | +- return s_transport_driver; |
| 91 | +- } else { /* CYCFG_BT_LP_ENABLED */ |
| 92 | +- static ble::vendor::cypress_ble::CyH4TransportDriver s_transport_driver( |
| 93 | +- /* TX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_TX), |
| 94 | +- /* RX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RX), |
| 95 | +- /* cts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_CTS), |
| 96 | +- /* rts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RTS), |
| 97 | +- /* power */ cyhal_gpio_to_rtos(CYBSP_BT_POWER), |
| 98 | +- DEF_BT_BAUD_RATE); |
| 99 | +- return s_transport_driver; |
| 100 | +- } |
| 101 | +-#else /* (defined(CYCFG_BT_LP_ENABLED)) */ |
| 102 | +- static ble::vendor::cypress_ble::CyH4TransportDriver s_transport_driver( |
| 103 | +- /* TX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_TX), |
| 104 | +- /* RX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RX), |
| 105 | +- /* cts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_CTS), |
| 106 | +- /* rts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RTS), |
| 107 | +- /* power */ cyhal_gpio_to_rtos(CYBSP_BT_POWER), |
| 108 | +- DEF_BT_BAUD_RATE), |
| 109 | +- cyhal_gpio_to_rtos(CYBSP_BT_HOST_WAKE), cyhal_gpio_to_rtos(CYBSP_BT_DEVICE_WAKE) |
| 110 | +- ); |
| 111 | +- return s_transport_driver; |
| 112 | +-#endif /* (defined(CYCFG_BT_LP_ENABLED)) */ |
| 113 | +- |
| 114 | +-#else /* (defined(MBED_TICKLESS) && DEVICE_SLEEP && DEVICE_LPTICKER) */ |
| 115 | +- static ble::vendor::cypress_ble::CyH4TransportDriver s_transport_driver( |
| 116 | +- /* TX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_TX), |
| 117 | +- /* RX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RX), |
| 118 | +- /* cts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_CTS), |
| 119 | +- /* rts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RTS), |
| 120 | +- /* power */ cyhal_gpio_to_rtos(CYBSP_BT_POWER), |
| 121 | +- DEF_BT_BAUD_RATE); |
| 122 | +- return s_transport_driver; |
| 123 | +-#endif /* (defined(MBED_TICKLESS) && DEVICE_SLEEP && DEVICE_LPTICKER) */ |
| 124 | +-} |
| 125 | +diff --git a/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/TARGET_PORTENTA_H7/cy_bt_cordio_cfg.cpp b/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/TARGET_PORTENTA_H7/cy_bt_cordio_cfg.cpp |
| 126 | +deleted file mode 100644 |
| 127 | +index 2d668fed9c..0000000000 |
| 128 | +--- a/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/TARGET_PORTENTA_H7/cy_bt_cordio_cfg.cpp |
| 129 | ++++ /dev/null |
| 130 | +@@ -1,105 +0,0 @@ |
| 131 | +-/******************************************************************************* |
| 132 | +-* \file cy_bt_cordio_cfg.cpp |
| 133 | +-* \version 1.0 |
| 134 | +-* |
| 135 | +-* |
| 136 | +-* Low Power Assist BT Pin configuration implementation. |
| 137 | +-* |
| 138 | +-******************************************************************************** |
| 139 | +-* \copyright |
| 140 | +-* Copyright 2019 Cypress Semiconductor Corporation |
| 141 | +-* SPDX-License-Identifier: Apache-2.0 |
| 142 | +-* |
| 143 | +-* Licensed under the Apache License, Version 2.0 (the "License"); |
| 144 | +-* you may not use this file except in compliance with the License. |
| 145 | +-* You may obtain a copy of the License at |
| 146 | +-* |
| 147 | +-* http://www.apache.org/licenses/LICENSE-2.0 |
| 148 | +-* |
| 149 | +-* Unless required by applicable law or agreed to in writing, software |
| 150 | +-* distributed under the License is distributed on an "AS IS" BASIS, |
| 151 | +-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 152 | +-* See the License for the specific language governing permissions and |
| 153 | +-* limitations under the License. |
| 154 | +-*******************************************************************************/ |
| 155 | +- |
| 156 | +-#include <stdio.h> |
| 157 | +-#include "ble/driver/CordioHCIDriver.h" |
| 158 | +-#include "hci_api.h" |
| 159 | +-#include "hci_cmd.h" |
| 160 | +-#include "hci_core.h" |
| 161 | +-#include "bstream.h" |
| 162 | +-#include "assert.h" |
| 163 | +-#include <stdbool.h> |
| 164 | +-#include "hci_mbed_os_adaptation.h" |
| 165 | +-#include "CyH4TransportDriver.h" |
| 166 | +- |
| 167 | +-#define cyhal_gpio_to_rtos(x) (x) |
| 168 | +-#define CYCFG_BT_LP_ENABLED (1) |
| 169 | +-#define CYCFG_BT_HOST_WAKE_IRQ_EVENT WAKE_EVENT_ACTIVE_LOW |
| 170 | +-#define CYCFG_BT_DEV_WAKE_POLARITY WAKE_EVENT_ACTIVE_LOW |
| 171 | +- |
| 172 | +-/******************************************************************************* |
| 173 | +-* Function Name: ble_cordio_get_h4_transport_driver |
| 174 | +-******************************************************************************** |
| 175 | +-* |
| 176 | +-* Strong implementation of function which calls CyH4TransportDriver constructor and return it |
| 177 | +-* |
| 178 | +-* \param none |
| 179 | +-* |
| 180 | +-* \return |
| 181 | +-* Returns the transport driver object |
| 182 | +-*******************************************************************************/ |
| 183 | +-ble::vendor::cypress_ble::CyH4TransportDriver& ble_cordio_get_h4_transport_driver() |
| 184 | +-{ |
| 185 | +-#if (defined(MBED_TICKLESS) && DEVICE_SLEEP && DEVICE_LPTICKER) |
| 186 | +- |
| 187 | +-#if (defined(CYCFG_BT_LP_ENABLED)) |
| 188 | +- if (CYCFG_BT_LP_ENABLED) { |
| 189 | +- static ble::vendor::cypress_ble::CyH4TransportDriver s_transport_driver( |
| 190 | +- /* TX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_TX), |
| 191 | +- /* RX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RX), |
| 192 | +- /* cts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_CTS), |
| 193 | +- /* rts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RTS), |
| 194 | +- /* power */ cyhal_gpio_to_rtos(CYBSP_BT_POWER), |
| 195 | +- DEF_BT_BAUD_RATE, |
| 196 | +- cyhal_gpio_to_rtos(CYBSP_BT_HOST_WAKE), |
| 197 | +- cyhal_gpio_to_rtos(CYBSP_BT_DEVICE_WAKE), |
| 198 | +- CYCFG_BT_HOST_WAKE_IRQ_EVENT, |
| 199 | +- CYCFG_BT_DEV_WAKE_POLARITY |
| 200 | +- ); |
| 201 | +- return s_transport_driver; |
| 202 | +- } else { /* CYCFG_BT_LP_ENABLED */ |
| 203 | +- static ble::vendor::cypress_ble::CyH4TransportDriver s_transport_driver( |
| 204 | +- /* TX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_TX), |
| 205 | +- /* RX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RX), |
| 206 | +- /* cts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_CTS), |
| 207 | +- /* rts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RTS), |
| 208 | +- /* power */ cyhal_gpio_to_rtos(CYBSP_BT_POWER), |
| 209 | +- DEF_BT_BAUD_RATE); |
| 210 | +- return s_transport_driver; |
| 211 | +- } |
| 212 | +-#else /* (defined(CYCFG_BT_LP_ENABLED)) */ |
| 213 | +- static ble::vendor::cypress_ble::CyH4TransportDriver s_transport_driver( |
| 214 | +- /* TX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_TX), |
| 215 | +- /* RX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RX), |
| 216 | +- /* cts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_CTS), |
| 217 | +- /* rts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RTS), |
| 218 | +- /* power */ cyhal_gpio_to_rtos(CYBSP_BT_POWER), |
| 219 | +- DEF_BT_BAUD_RATE), |
| 220 | +- cyhal_gpio_to_rtos(CYBSP_BT_HOST_WAKE), cyhal_gpio_to_rtos(CYBSP_BT_DEVICE_WAKE) |
| 221 | +- ); |
| 222 | +- return s_transport_driver; |
| 223 | +-#endif /* (defined(CYCFG_BT_LP_ENABLED)) */ |
| 224 | +- |
| 225 | +-#else /* (defined(MBED_TICKLESS) && DEVICE_SLEEP && DEVICE_LPTICKER) */ |
| 226 | +- static ble::vendor::cypress_ble::CyH4TransportDriver s_transport_driver( |
| 227 | +- /* TX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_TX), |
| 228 | +- /* RX */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RX), |
| 229 | +- /* cts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_CTS), |
| 230 | +- /* rts */ cyhal_gpio_to_rtos(CYBSP_BT_UART_RTS), |
| 231 | +- /* power */ cyhal_gpio_to_rtos(CYBSP_BT_POWER), |
| 232 | +- DEF_BT_BAUD_RATE); |
| 233 | +- return s_transport_driver; |
| 234 | +-#endif /* (defined(MBED_TICKLESS) && DEVICE_SLEEP && DEVICE_LPTICKER) */ |
| 235 | +-} |
| 236 | +-- |
| 237 | +2.42.0 |
| 238 | + |
0 commit comments