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
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
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
card10
firmware
Commits
045d3a2c
Commit
045d3a2c
authored
3 years ago
by
schneider
Browse files
Options
Downloads
Patches
Plain Diff
feat(ble): Delay epic con open ind until epicardium is done
parent
62791cdf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!458
feat(ble): Delay epic con open ind until epicardium is done
Pipeline
#5159
passed
3 years ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
epicardium/ble/ble_api.h
+1
-0
1 addition, 0 deletions
epicardium/ble/ble_api.h
epicardium/ble/ble_attc.c
+2
-0
2 additions, 0 deletions
epicardium/ble/ble_attc.c
epicardium/ble/epic_ble_api.c
+20
-1
20 additions, 1 deletion
epicardium/ble/epic_ble_api.c
with
23 additions
and
1 deletion
epicardium/ble/ble_api.h
+
1
−
0
View file @
045d3a2c
...
...
@@ -48,6 +48,7 @@ void ble_epic_att_api_free_att_write_data(struct epic_att_write *w);
void
ble_epic_ble_api_trigger_event
(
enum
epic_ble_event_type
type
,
void
*
data
);
void
ble_epic_ble_api_init
(
void
);
void
ble_epic_dm_api_event
(
dmEvt_t
*
dm_event
);
void
ble_epic_disc_cfg_complete
(
void
);
void
ble_adv_init
(
void
);
void
ble_adv_setup
(
void
);
...
...
This diff is collapsed.
Click to expand it.
epicardium/ble/ble_attc.c
+
2
−
0
View file @
045d3a2c
#include
<stdint.h>
#include
<stdbool.h>
#include
"ble_api.h"
#include
"wsf_types.h"
#include
"util/bstream.h"
#include
"app_api.h"
...
...
@@ -258,6 +259,7 @@ void bleDiscCback(dmConnId_t connId, uint8_t status)
case
APP_DISC_CFG_CMPL
:
AppDiscComplete
(
connId
,
APP_DISC_CFG_CMPL
);
ble_epic_disc_cfg_complete
();
break
;
case
APP_DISC_CFG_CONN_START
:
...
...
This diff is collapsed.
Click to expand it.
epicardium/ble/epic_ble_api.c
+
20
−
1
View file @
045d3a2c
...
...
@@ -24,6 +24,7 @@ static StaticQueue_t ble_event_queue_data;
static
uint8_t
adv_data_buf
[
HCI_ADV_DATA_LEN
];
static
uint8_t
sr_data_buf
[
HCI_ADV_DATA_LEN
];
static
dmEvt_t
connection_open_event
;
int
epic_ble_free_event
(
struct
epic_ble_event
*
e
)
{
...
...
@@ -85,7 +86,7 @@ void ble_epic_ble_api_init(void)
ble_epic_att_api_init
();
}
void
ble_epic_dm_api
_event
(
dmEvt_t
*
dm_event
)
static
void
send_dm
_event
(
dmEvt_t
*
dm_event
)
{
dmEvt_t
*
e
=
WsfBufAlloc
(
sizeof
(
*
e
));
...
...
@@ -97,6 +98,24 @@ void ble_epic_dm_api_event(dmEvt_t *dm_event)
}
}
void
ble_epic_dm_api_event
(
dmEvt_t
*
dm_event
)
{
if
(
dm_event
->
hdr
.
event
==
DM_CONN_OPEN_IND
)
{
/* Cache the connection open indication until
* epicardium is done dicovering services. */
memcpy
(
&
connection_open_event
,
dm_event
,
sizeof
(
connection_open_event
));
}
else
{
send_dm_event
(
dm_event
);
}
}
void
ble_epic_disc_cfg_complete
(
void
)
{
send_dm_event
(
&
connection_open_event
);
}
void
epic_ble_close_connection
(
uint8_t
connId
)
{
AppConnClose
(
connId
);
...
...
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