Merge pull request #6743 from pan-/ble-cordio-h4-conditionnal-to-fc

BLE: Conditional compilation of H4 driver
pull/6842/merge
Cruz Monrreal 2018-05-08 10:41:58 -05:00 committed by GitHub
commit 5b5c8ddb4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View File

@ -93,8 +93,10 @@ More information about the architecture can be found in the
#### HCITransport
> **Note:** If the Bluetooth controller uses an H4 communication interface, this
step can be skipped.
> **Note:** If the Bluetooth controller uses an H4 communication interface and
the host exposes serial flow control in mbed then this step can be skipped and
the class `ble::vendor::cordio::H4TransportDriver` can be used as the transport
driver.
An empty transport driver can be coded as:

View File

@ -14,6 +14,8 @@
* limitations under the License.
*/
#if DEVICE_SERIAL && DEVICE_SERIAL_FC
#include "H4TransportDriver.h"
namespace ble {
@ -68,3 +70,5 @@ void H4TransportDriver::on_controller_irq()
} // namespace cordio
} // namespace vendor
} // namespace ble
#endif

View File

@ -17,6 +17,8 @@
#ifndef CORDIO_H4_TRANSPORT_DRIVER_H_
#define CORDIO_H4_TRANSPORT_DRIVER_H_
#if (DEVICE_SERIAL && DEVICE_SERIAL_FC) || defined(DOXYGEN_ONLY)
#include <stdint.h>
#include "mbed.h"
#include "CordioHCITransportDriver.h"
@ -27,6 +29,9 @@ namespace cordio {
/**
* Implementation of the H4 driver.
*
* @note This HCI transport implementation is not accessible to devices that do
* not expose serial flow control.
*/
class H4TransportDriver : public CordioHCITransportDriver {
public:
@ -73,4 +78,6 @@ private:
} // namespace vendor
} // namespace ble
#endif
#endif /* CORDIO_H4_TRANSPORT_DRIVER_H_ */