forked from blue-heron/blue_heron
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9dd64a4
commit 78943ba
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
lib/blue_heron/hci/commands/le_controller/read_white_list_size.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
defmodule BlueHeron.HCI.Command.LEController.ReadWhiteListSize do | ||
use BlueHeron.HCI.Command.LEController, ocf: 0x000F | ||
|
||
defparameters [] | ||
|
||
defimpl BlueHeron.HCI.Serializable do | ||
def serialize(%{opcode: opcode}) do | ||
<<opcode::binary, 0x00>> | ||
end | ||
end | ||
|
||
@impl BlueHeron.HCI.Command | ||
def deserialize(<<@opcode::binary, 0x00>>) do | ||
new() | ||
end | ||
|
||
@impl BlueHeron.HCI.Command | ||
def deserialize_return_parameters(<<status, white_list_size>>) do | ||
%{ | ||
status: status, | ||
white_list_size: white_list_size | ||
} | ||
end | ||
|
||
@impl BlueHeron.HCI.Command | ||
def serialize_return_parameters(%{status: status, white_list_size: white_list_size}) do | ||
<<BlueHeron.ErrorCode.to_code!(status), white_list_size>> | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters