Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Philip Stewart
firmware
Commits
7a73f992
Commit
7a73f992
authored
4 years ago
by
schneider
Browse files
Options
Downloads
Patches
Plain Diff
feat(ble): Read device name from peer
parent
113177f4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
epicardium/ble/ble_attc.c
+2
-0
2 additions, 0 deletions
epicardium/ble/ble_attc.c
epicardium/ble/profiles/gap_api.h
+1
-0
1 addition, 0 deletions
epicardium/ble/profiles/gap_api.h
epicardium/ble/profiles/gap_main.c
+19
-2
19 additions, 2 deletions
epicardium/ble/profiles/gap_main.c
with
22 additions
and
2 deletions
epicardium/ble/ble_attc.c
+
2
−
0
View file @
7a73f992
...
...
@@ -73,6 +73,8 @@ static const attcDiscCfg_t bleDiscCfgList[] =
/* Write: GATT service changed ccc descriptor */
{
bleGattScCccVal
,
sizeof
(
bleGattScCccVal
),
(
GATT_SC_CCC_HDL_IDX
+
BLE_DISC_GATT_START
)},
{
NULL
,
0
,
(
GAP_DN_HDL_IDX
+
BLE_DISC_GAP_START
)},
/* Read: GAP central address resolution attribute */
{
NULL
,
0
,
(
GAP_CAR_HDL_IDX
+
BLE_DISC_GAP_START
)},
...
...
This diff is collapsed.
Click to expand it.
epicardium/ble/profiles/gap_api.h
+
1
−
0
View file @
7a73f992
...
...
@@ -35,6 +35,7 @@ extern "C" {
/*! \brief Enumeration of handle indexes of characteristics to be discovered */
enum
{
GAP_DN_HDL_IDX
,
GAP_CAR_HDL_IDX
,
/*!< \brief Central Address Resolution */
GAP_RPAO_HDL_IDX
,
/*!< \brief Resolvable Private Address Only */
GAP_HDL_LIST_LEN
/*!< \brief Handle list length */
...
...
This diff is collapsed.
Click to expand it.
epicardium/ble/profiles/gap_main.c
+
19
−
2
View file @
7a73f992
...
...
@@ -22,13 +22,24 @@
#include
"wsf_trace.h"
#include
"app_db.h"
#include
"app_api.h"
#include
"gap/gap_api.h"
#include
"gap_api.h"
/* card10:
* copied from lib/sdk/Libraries/BTLE/stack/ble-profiles/sources/profiles/gap/gap_main.c
*/
/* clang-format off */
/* clang-formet turned off for easier diffing against orginal file */
/**************************************************************************************************
Local Variables
**************************************************************************************************/
/*! GAP service characteristics for discovery */
static
const
attcDiscChar_t
gapDn
=
{
attDnChUuid
,
0
};
/*! Central Address Resolution */
static
const
attcDiscChar_t
gapCar
=
...
...
@@ -47,6 +58,7 @@ static const attcDiscChar_t gapRpao =
/*! List of characteristics to be discovered; order matches handle index enumeration */
static
const
attcDiscChar_t
*
gapDiscCharList
[]
=
{
&
gapDn
,
&
gapCar
,
/* Central Address Resolution */
&
gapRpao
/* Resolvable Private Address Only */
};
...
...
@@ -90,8 +102,12 @@ uint8_t GapValueUpdate(uint16_t *pHdlList, attEvt_t *pMsg)
{
uint8_t
status
=
ATT_SUCCESS
;
/* device name string */
if
(
pMsg
->
handle
==
pHdlList
[
GAP_DN_HDL_IDX
])
{
}
/* Central Address Resolution */
if
(
pMsg
->
handle
==
pHdlList
[
GAP_CAR_HDL_IDX
])
else
if
(
pMsg
->
handle
==
pHdlList
[
GAP_CAR_HDL_IDX
])
{
appDbHdl_t
dbHdl
;
...
...
@@ -120,3 +136,4 @@ uint8_t GapValueUpdate(uint16_t *pHdlList, attEvt_t *pMsg)
return
status
;
}
/* clang-format on */
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