Skip to content

Commit 5b5c8dd

Browse files
author
Cruz Monrreal
authored
Merge pull request #6743 from pan-/ble-cordio-h4-conditionnal-to-fc
BLE: Conditional compilation of H4 driver
2 parents a5326ca + 5659216 commit 5b5c8dd

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/doc/PortingGuide.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ More information about the architecture can be found in the
9393

9494
#### HCITransport
9595

96-
> **Note:** If the Bluetooth controller uses an H4 communication interface, this
97-
step can be skipped.
96+
> **Note:** If the Bluetooth controller uses an H4 communication interface and
97+
the host exposes serial flow control in mbed then this step can be skipped and
98+
the class `ble::vendor::cordio::H4TransportDriver` can be used as the transport
99+
driver.
98100

99101
An empty transport driver can be coded as:
100102

features/FEATURE_BLE/targets/TARGET_CORDIO/driver/H4TransportDriver.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
#if DEVICE_SERIAL && DEVICE_SERIAL_FC
18+
1719
#include "H4TransportDriver.h"
1820

1921
namespace ble {
@@ -68,3 +70,5 @@ void H4TransportDriver::on_controller_irq()
6870
} // namespace cordio
6971
} // namespace vendor
7072
} // namespace ble
73+
74+
#endif

features/FEATURE_BLE/targets/TARGET_CORDIO/driver/H4TransportDriver.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#ifndef CORDIO_H4_TRANSPORT_DRIVER_H_
1818
#define CORDIO_H4_TRANSPORT_DRIVER_H_
1919

20+
#if (DEVICE_SERIAL && DEVICE_SERIAL_FC) || defined(DOXYGEN_ONLY)
21+
2022
#include <stdint.h>
2123
#include "mbed.h"
2224
#include "CordioHCITransportDriver.h"
@@ -27,6 +29,9 @@ namespace cordio {
2729

2830
/**
2931
* Implementation of the H4 driver.
32+
*
33+
* @note This HCI transport implementation is not accessible to devices that do
34+
* not expose serial flow control.
3035
*/
3136
class H4TransportDriver : public CordioHCITransportDriver {
3237
public:
@@ -73,4 +78,6 @@ class H4TransportDriver : public CordioHCITransportDriver {
7378
} // namespace vendor
7479
} // namespace ble
7580

81+
#endif
82+
7683
#endif /* CORDIO_H4_TRANSPORT_DRIVER_H_ */

0 commit comments

Comments
 (0)