harald v0.1.1 Harald.HCI View Source
The HCI provides a uniform interface method of accessing a Bluetooth Controller’s capabilities.
Reference: Version 5.0, Vol. 2, Part E, 1
Link to this section Summary
Types
OpCode Command Field
OpCode Group Field
Each command is assigned a 2 byte Opcode used to uniquely identify different types of commands. The Opcode parameter is divided into two fields, called the OpCode Group Field (OGF) and OpCode Command Field (OCF). The OGF occupies the upper 6 bits of the Opcode, while the OCF occupies the remaining 10 bits. The OGF of 0x3F is reserved for vendor-specific debug commands. The organization of the opcodes allows additional information to be inferred without fully decoding the entire Opcode
Link to this section Types
command()
View Source
command() :: <<_::8, _::_*8>>
command() :: <<_::8, _::_*8>>
ocf()
View Source
ocf() :: 0..1023
ocf() :: 0..1023
OpCode Command Field.
See opcode/0
ogf()
View Source
ogf() :: 0..63
ogf() :: 0..63
OpCode Group Field.
See opcode/0
opcode()
View Source
opcode() :: binary()
opcode() :: binary()
Each command is assigned a 2 byte Opcode used to uniquely identify different types of commands. The Opcode parameter is divided into two fields, called the OpCode Group Field (OGF) and OpCode Command Field (OCF). The OGF occupies the upper 6 bits of the Opcode, while the OCF occupies the remaining 10 bits. The OGF of 0x3F is reserved for vendor-specific debug commands. The organization of the opcodes allows additional information to be inferred without fully decoding the entire Opcode.
Reference: Version 5.0, Vol. 2, Part E, 5.4.1
opt() View Source
opts() View Source
Link to this section Functions
command(opcode, opts \\ "") View Source
opcode(ogf, ocf) View Source
to_bin(bin) View Source
Convert a value to a binary.
iex> to_bin(false)
<<0>>
iex> to_bin(true)
<<1>>
iex> to_bin(<<1, 2, 3>>)
<<1, 2, 3>>