Cordio: Improve cordio H4 driver.

Ommit H4 driver definition if serial flow control is not supported.
pull/6743/head
Vincent Coubard 2018-04-25 12:07:49 +01:00
parent 34c9206054
commit 565921608e
2 changed files with 11 additions and 0 deletions

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_ */