#include <controller2.h>
Public Types | |
enum class | FeaturesBits : uint32_t { kHciSco = (1 << 0) , kSetAclPriorityCommand = (1 << 1) , kAndroidVendorExtensions = (1 << 2) } |
Bitmask of features the controller supports. More... | |
enum class | ScoCodingFormat : uint8_t { kCvsd , kMsbc } |
enum class | ScoEncoding : uint8_t { k8Bits , k16Bits } |
enum class | ScoSampleRate : uint8_t { k8Khz , k16Khz } |
Public Member Functions | |
virtual async2::Poll< Status > | PendError (async2::Context &cx)=0 |
virtual async2::OnceReceiver< Status > | Initialize ()=0 |
virtual async2::OnceReceiver< Status > | ConfigureSco (ScoCodingFormat coding_format, ScoEncoding encoding, ScoSampleRate sample_rate)=0 |
virtual async2::OnceReceiver< Status > | ResetSco ()=0 |
virtual async2::OnceReceiver< FeaturesBits > | GetFeatures ()=0 |
virtual async2::OnceReceiver< Result< multibuf::MultiBuf > > | EncodeVendorCommand (VendorCommandParameters parameters)=0 |
The Controller class is a shim for communication between the Host and the Controller. Controller is a pw::Channel
used to send and receive HCI packets. The first byte of each datagram is a UART packet indicator (H4PacketType
Emboss enum).
|
strong |
Bitmask of features the controller supports.
Enumerator | |
---|---|
kHciSco | Indicates support for transferring Synchronous Connection-Oriented (SCO) link data over the HCI. Offloaded SCO links may still be supported even if HCI SCO isn't. |
kSetAclPriorityCommand | Indicates support for the Set Acl Priority command. |
kAndroidVendorExtensions | Indicates support for the |
|
pure virtual |
Configure the HCI for a SCO connection with the indicated parameters.
|
pure virtual |
Encode the vendor-specific HCI command for a generic type of vendor command, and return the encoded command in a buffer.
parameters | Vendor command to encode. |
|
pure virtual |
|
pure virtual |
Initializes the controller interface and starts processing packets. Asynchronously returns the result of initialization.
On success, HCI packets may now be sent and received with this object.
|
pure virtual |
Returns Ready when fatal errors occur after initialization. After a fatal error, this object is invalid.
|
pure virtual |
Releases the resources held by an active SCO connection. This should be called when a SCO connection is closed. No-op if no SCO connection is configured.