Skip to content

Commit 5659216

Browse files
committed
Cordio: Improve cordio H4 driver.
Ommit H4 driver definition if serial flow control is not supported.
1 parent 34c9206 commit 5659216

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

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)