Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_packages_modules_Bluetooth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LMODroid
platform_packages_modules_Bluetooth
Commits
ebfcf233
Commit
ebfcf233
authored
10 years ago
by
Chris Manton
Committed by
Andre Eisenbach
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add bdcopy method
parent
a5657a8a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
system/btcore/include/bdaddr.h
+4
-0
4 additions, 0 deletions
system/btcore/include/bdaddr.h
system/btcore/src/bdaddr.c
+7
-0
7 additions, 0 deletions
system/btcore/src/bdaddr.c
with
11 additions
and
0 deletions
system/btcore/include/bdaddr.h
+
4
−
0
View file @
ebfcf233
...
...
@@ -38,6 +38,10 @@ bool bdaddr_is_empty(const bt_bdaddr_t *addr);
// may be NULL.
bool
bdaddr_equals
(
const
bt_bdaddr_t
*
first
,
const
bt_bdaddr_t
*
second
);
// Returns destination bdaddr |dest| after copying |src| to |dest|.
// |dest| and |src| must not be NULL.
bt_bdaddr_t
*
bdaddr_copy
(
bt_bdaddr_t
*
dest
,
const
bt_bdaddr_t
*
src
);
// Makes a string representation of |addr| and places it into |string|. |size|
// refers to the size of |string|'s buffer and must be >= 18. On success, this
// function returns |string|, otherwise it returns NULL. Neither |addr| nor |string|
...
...
This diff is collapsed.
Click to expand it.
system/btcore/src/bdaddr.c
+
7
−
0
View file @
ebfcf233
...
...
@@ -37,6 +37,13 @@ bool bdaddr_equals(const bt_bdaddr_t *first, const bt_bdaddr_t *second) {
return
memcmp
(
first
,
second
,
sizeof
(
bt_bdaddr_t
))
==
0
;
}
bt_bdaddr_t
*
bdaddr_copy
(
bt_bdaddr_t
*
dest
,
const
bt_bdaddr_t
*
src
)
{
assert
(
dest
!=
NULL
);
assert
(
src
!=
NULL
);
return
(
bt_bdaddr_t
*
)
memcpy
(
dest
,
src
,
sizeof
(
bt_bdaddr_t
));
}
const
char
*
bdaddr_to_string
(
const
bt_bdaddr_t
*
addr
,
char
*
string
,
size_t
size
)
{
assert
(
addr
!=
NULL
);
assert
(
string
!=
NULL
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment