remove generic, TPPs, nested namespaces

pull/13365/head
Paul Szczeanek 2020-07-26 22:12:41 +01:00
parent f5358a7ff4
commit 365cb3c5d0
742 changed files with 6118 additions and 9317 deletions

View File

@ -1,9 +1,10 @@
^BUILD ^BUILD
^cmsis ^cmsis
^connectivity/drivers/ble
^connectivity/FEATURE_BLE
^connectivity/libraries/mbed-coap ^connectivity/libraries/mbed-coap
^connectivity/libraries/ppp ^connectivity/libraries/ppp
^features/cryptocell ^features/cryptocell
^features/FEATURE_BLE
^features/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV ^features/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV
^features/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM ^features/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM
^features/frameworks ^features/frameworks

View File

@ -27,7 +27,7 @@
#include "platform/mbed_wait_api.h" #include "platform/mbed_wait_api.h"
// FEATURE_BLE/targets/TARGET_CORDIO // FEATURE_BLE/targets/TARGET_CORDIO
#include "CordioBLE.h" #include "CordioBLEInstanceBase.h"
#include "CordioHCIDriver.h" #include "CordioHCIDriver.h"
#include "CordioHCITransportDriver.h" #include "CordioHCITransportDriver.h"
#include "hci_api.h" #include "hci_api.h"
@ -64,17 +64,17 @@ namespace bluenrg_ms {
/** /**
* BlueNRG_MS HCI driver implementation. * BlueNRG_MS HCI driver implementation.
* @see cordio::CordioHCIDriver * @see CordioHCIDriver
*/ */
class HCIDriver : public cordio::CordioHCIDriver { class HCIDriver : public CordioHCIDriver {
public: public:
/** /**
* Construction of the BlueNRG_MS HCIDriver. * Construction of the BlueNRG_MS HCIDriver.
* @param transport: Transport of the HCI commands. * @param transport: Transport of the HCI commands.
* @param rst: Name of the reset pin * @param rst: Name of the reset pin
*/ */
HCIDriver(cordio::CordioHCITransportDriver &transport_driver, PinName rst) : HCIDriver(CordioHCITransportDriver &transport_driver, PinName rst) :
cordio::CordioHCIDriver(transport_driver), rst(rst) { } CordioHCIDriver(transport_driver), rst(rst) { }
/** /**
* @see CordioHCIDriver::do_initialize * @see CordioHCIDriver::do_initialize
@ -87,10 +87,10 @@ public:
/** /**
* @see CordioHCIDriver::get_buffer_pool_description * @see CordioHCIDriver::get_buffer_pool_description
*/ */
ble::vendor::cordio::buf_pool_desc_t get_buffer_pool_description() ble::buf_pool_desc_t get_buffer_pool_description()
{ {
// Use default buffer pool // Use default buffer pool
return ble::vendor::cordio::CordioHCIDriver::get_default_buffer_pool_description(); return ble::CordioHCIDriver::get_default_buffer_pool_description();
} }
/** /**
@ -435,7 +435,7 @@ private:
* event from the stack. This might not be the best solution for all BLE chip; * event from the stack. This might not be the best solution for all BLE chip;
* especially this one. * especially this one.
*/ */
class TransportDriver : public cordio::CordioHCITransportDriver { class TransportDriver : public CordioHCITransportDriver {
public: public:
/** /**
* Construct the transport driver required by a BlueNRG_MS module. * Construct the transport driver required by a BlueNRG_MS module.
@ -607,7 +607,7 @@ exit:
/** /**
* Cordio HCI driver factory * Cordio HCI driver factory
*/ */
ble::vendor::cordio::CordioHCIDriver &ble_cordio_get_hci_driver() ble::CordioHCIDriver &ble_cordio_get_hci_driver()
{ {
static ble::vendor::bluenrg_ms::TransportDriver transport_driver( static ble::vendor::bluenrg_ms::TransportDriver transport_driver(
MBED_CONF_BLUENRG_MS_SPI_MOSI, MBED_CONF_BLUENRG_MS_SPI_MOSI,

View File

@ -32,18 +32,16 @@
using namespace utest::v1; using namespace utest::v1;
using ble::vendor::cordio::CordioHCIDriver; using ble::CordioHCIDriver;
using ble::vendor::cordio::CordioHCITransportDriver; using ble::CordioHCITransportDriver;
extern ble::vendor::cordio::CordioHCIDriver &ble_cordio_get_hci_driver(); extern ble::CordioHCIDriver &ble_cordio_get_hci_driver();
#if CORDIO_ZERO_COPY_HCI #if CORDIO_ZERO_COPY_HCI
#error [NOT_SUPPORTED] Test not relevant for zero copy hci. #error [NOT_SUPPORTED] Test not relevant for zero copy hci.
#else #else
namespace ble { namespace ble {
namespace vendor {
namespace cordio {
struct CordioHCIHook { struct CordioHCIHook {
static CordioHCIDriver &get_driver() static CordioHCIDriver &get_driver()
@ -62,11 +60,9 @@ struct CordioHCIHook {
} }
}; };
} // namespace cordio
} // namespace vendor
} // namespace ble } // namespace ble
using ble::vendor::cordio::CordioHCIHook; using ble::CordioHCIHook;
// //
// Handle signal mechanism // Handle signal mechanism

View File

@ -53,7 +53,7 @@ More information about the architecture can be found in [HCI abstraction archite
#### HCITransport #### HCITransport
<span class="notes">**Note:** If the Bluetooth controller uses an H4 communication interface and the host exposes serial flow control in Mbed, you can skip this step. Use the class `ble::vendor::cordio::H4TransportDriver` as the transport driver.</span> <span class="notes">**Note:** If the Bluetooth controller uses an H4 communication interface and the host exposes serial flow control in Mbed, you can skip this step. Use the class `ble::H4TransportDriver` as the transport driver.</span>
The transport driver shall inherit publicly from the base class `CordioHCITransportDriver`. The transport driver shall inherit publicly from the base class `CordioHCITransportDriver`.
@ -66,7 +66,7 @@ namespace ble {
namespace vendor { namespace vendor {
namespace target_name { namespace target_name {
class TransportDriver : public cordio::CordioHCITransportDriver { class TransportDriver : public CordioHCITransportDriver {
public: public:
TransportDriver(/* specific constructor arguments*/); TransportDriver(/* specific constructor arguments*/);
@ -114,10 +114,10 @@ namespace ble {
namespace vendor { namespace vendor {
namespace target_name { namespace target_name {
class HCIDriver : public cordio::CordioHCIDriver { class HCIDriver : public CordioHCIDriver {
public: public:
HCIDriver( HCIDriver(
cordio::CordioHCITransportDriver& transport_driver, CordioHCITransportDriver& transport_driver,
/* specific constructor arguments*/ /* specific constructor arguments*/
); );
@ -434,13 +434,13 @@ Given that the `CordioBLE` class doesn't know which class constructs the driver
This function is in the global namespace, and its signature is: This function is in the global namespace, and its signature is:
``` ```
ble::vendor::cordio::CordioHCIDriver& ble_cordio_get_hci_driver(); ble::CordioHCIDriver& ble_cordio_get_hci_driver();
``` ```
**Example:** **Example:**
``` ```
ble::vendor::cordio::CordioHCIDriver& ble_cordio_get_hci_driver() { ble::CordioHCIDriver& ble_cordio_get_hci_driver() {
static ble::vendor::target_name::TransportDriver transport_driver( static ble::vendor::target_name::TransportDriver transport_driver(
/* transport parameters */ /* transport parameters */
); );

View File

@ -17,7 +17,9 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include "CordioBLE.h" #include "ble/internal/cordio/CordioBLEInstanceBase.h"
#include "ble/BLE.h"
#include "ble/Gap.h"
#include "CordioHCIDriver.h" #include "CordioHCIDriver.h"
#include "hci_api.h" #include "hci_api.h"
#include "hci_cmd.h" #include "hci_cmd.h"
@ -28,8 +30,6 @@
#define HCI_RESET_RAND_CNT 4 #define HCI_RESET_RAND_CNT 4
namespace ble { namespace ble {
namespace vendor {
namespace cordio {
namespace { namespace {
@ -98,7 +98,7 @@ buf_pool_desc_t CordioHCIDriver::get_default_buffer_pool_description()
void CordioHCIDriver::set_random_static_address(const ble::address_t& address) void CordioHCIDriver::set_random_static_address(const ble::address_t& address)
{ {
ble_error_t err = cordio::BLE::deviceInstance().getGap().setRandomStaticAddress(address); ble_error_t err = CordioBLEInstanceBase::deviceInstance().getGap().setRandomStaticAddress(address);
MBED_ASSERT(err == BLE_ERROR_NONE); MBED_ASSERT(err == BLE_ERROR_NONE);
} }
@ -368,6 +368,4 @@ ble_error_t CordioHCIDriver::set_tx_power(int8_t level_db) {
return BLE_ERROR_NOT_IMPLEMENTED; return BLE_ERROR_NOT_IMPLEMENTED;
} }
} // namespace cordio
} // namespace vendor
} // namespace ble } // namespace ble

View File

@ -22,12 +22,10 @@
#include <BLETypes.h> #include <BLETypes.h>
#include "wsf_buf.h" #include "wsf_buf.h"
#include "CordioHCITransportDriver.h" #include "CordioHCITransportDriver.h"
#include "ble/blecommon.h" #include "ble/types/blecommon.h"
#include "mbed.h" #include "mbed.h"
namespace ble { namespace ble {
namespace vendor {
namespace cordio {
/** /**
* Contain description of the memory pool used by the Cordio stack. * Contain description of the memory pool used by the Cordio stack.
@ -229,9 +227,6 @@ private:
CordioHCITransportDriver& _transport_driver; CordioHCITransportDriver& _transport_driver;
}; };
} // namespace cordio
} // namespace vendor
} // namespace ble } // namespace ble
#endif /* CORDIO_HCI_DRIVER_H_ */ #endif /* CORDIO_HCI_DRIVER_H_ */

View File

@ -23,8 +23,6 @@
extern "C" void hciTrSerialRxIncoming(uint8_t *pBuf, uint8_t len); extern "C" void hciTrSerialRxIncoming(uint8_t *pBuf, uint8_t len);
namespace ble { namespace ble {
namespace vendor {
namespace cordio {
CordioHCITransportDriver::data_received_handler_t CordioHCITransportDriver::data_received_handler_t
CordioHCITransportDriver::data_received_handler = hciTrSerialRxIncoming; CordioHCITransportDriver::data_received_handler = hciTrSerialRxIncoming;
@ -44,6 +42,4 @@ void CordioHCITransportDriver::set_data_received_handler(data_received_handler_t
data_received_handler = handler; data_received_handler = handler;
} }
} // namespace cordio
} // namespace vendor
} // namespace ble } // namespace ble

View File

@ -20,8 +20,6 @@
#include <stdint.h> #include <stdint.h>
namespace ble { namespace ble {
namespace vendor {
namespace cordio {
/** /**
* Base class of the HCI transport driver. * Base class of the HCI transport driver.
@ -78,8 +76,6 @@ private:
static void set_data_received_handler(data_received_handler_t handler); static void set_data_received_handler(data_received_handler_t handler);
}; };
} // namespace cordio
} // namespace vendor
} // namespace ble } // namespace ble
#endif /* CORDIO_HCI_TRANSPORT_DRIVER_H_ */ #endif /* CORDIO_HCI_TRANSPORT_DRIVER_H_ */

View File

@ -19,8 +19,6 @@
#include "H4TransportDriver.h" #include "H4TransportDriver.h"
namespace ble { namespace ble {
namespace vendor {
namespace cordio {
H4TransportDriver::H4TransportDriver(PinName tx, PinName rx, PinName cts, PinName rts, int baud) : H4TransportDriver::H4TransportDriver(PinName tx, PinName rx, PinName cts, PinName rts, int baud) :
uart(tx, rx, baud), cts(cts), rts(rts) { } uart(tx, rx, baud), cts(cts), rts(rts) { }
@ -69,8 +67,6 @@ void H4TransportDriver::on_controller_irq()
} }
} }
} // namespace cordio
} // namespace vendor
} // namespace ble } // namespace ble
#endif #endif

View File

@ -24,8 +24,6 @@
#include "CordioHCITransportDriver.h" #include "CordioHCITransportDriver.h"
namespace ble { namespace ble {
namespace vendor {
namespace cordio {
/** /**
* Implementation of the H4 driver. * Implementation of the H4 driver.
@ -76,8 +74,6 @@ private:
PinName rts; PinName rts;
}; };
} // namespace cordio
} // namespace vendor
} // namespace ble } // namespace ble
#endif #endif

Some files were not shown because too many files have changed in this diff Show More