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
f1597a27
Commit
f1597a27
authored
4 years ago
by
schneider
Browse files
Options
Downloads
Patches
Plain Diff
feat(ble): Decode some more events
parent
93991bda
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
epicardium/ble/ble_main.c
+41
-1
41 additions, 1 deletion
epicardium/ble/ble_main.c
with
41 additions
and
1 deletion
epicardium/ble/ble_main.c
+
41
−
1
View file @
f1597a27
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include
"wsf_msg.h"
#include
"wsf_msg.h"
#include
"wsf_trace.h"
#include
"wsf_trace.h"
#include
"hci_api.h"
#include
"hci_api.h"
#include
"l2c_api.h"
#include
"dm_api.h"
#include
"dm_api.h"
#include
"att_api.h"
#include
"att_api.h"
#include
"smp_api.h"
#include
"smp_api.h"
...
@@ -203,6 +204,28 @@ static uint32_t pair_confirm_value;
...
@@ -203,6 +204,28 @@ static uint32_t pair_confirm_value;
static
void
BleHandler
(
wsfEventMask_t
event
,
wsfMsgHdr_t
*
pMsg
);
static
void
BleHandler
(
wsfEventMask_t
event
,
wsfMsgHdr_t
*
pMsg
);
static
const
char
*
const
att_events
[]
=
{
"ATTC_FIND_INFO_RSP"
,
"ATTC_FIND_BY_TYPE_VALUE_RSP"
,
"ATTC_READ_BY_TYPE_RSP"
,
"ATTC_READ_RSP"
,
"ATTC_READ_LONG_RSP"
,
"ATTC_READ_MULTIPLE_RSP"
,
"ATTC_READ_BY_GROUP_TYPE_RSP"
,
"ATTC_WRITE_RSP"
,
"ATTC_WRITE_CMD_RSP"
,
"ATTC_PREPARE_WRITE_RSP"
,
"ATTC_EXECUTE_WRITE_RSP"
,
"ATTC_HANDLE_VALUE_NTF"
,
"ATTC_HANDLE_VALUE_IND"
,
/* ATT server callback events */
"ATTS_HANDLE_VALUE_CNF"
,
"ATTS_CCC_STATE_IND"
,
"ATTS_DB_HASH_CALC_CMPL_IND"
,
/* ATT common callback events */
"ATT_MTU_UPDATE_IND"
};
static
const
char
*
const
dm_events
[]
=
{
static
const
char
*
const
dm_events
[]
=
{
"DM_RESET_CMPL_IND"
,
"DM_RESET_CMPL_IND"
,
"DM_ADV_START_IND"
,
"DM_ADV_START_IND"
,
...
@@ -276,6 +299,13 @@ static const char * const dm_events[] = {
...
@@ -276,6 +299,13 @@ static const char * const dm_events[] = {
"DM_HW_ERROR_IND"
,
"DM_HW_ERROR_IND"
,
"DM_VENDOR_SPEC_IND"
"DM_VENDOR_SPEC_IND"
};
};
static
const
char
*
const
l2c_coc_events
[]
=
{
"L2C_COC_CONNECT_IND"
,
"L2C_COC_DISCONNECT_IND"
,
"L2C_COC_DATA_IND"
,
"L2C_COC_DATA_CNF"
};
/*************************************************************************************************/
/*************************************************************************************************/
/*!
/*!
* \brief Application DM callback.
* \brief Application DM callback.
...
@@ -748,7 +778,17 @@ static void BleHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg)
...
@@ -748,7 +778,17 @@ static void BleHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg)
/* process security-related messages */
/* process security-related messages */
AppSlaveSecProcDmMsg
((
dmEvt_t
*
)
pMsg
);
AppSlaveSecProcDmMsg
((
dmEvt_t
*
)
pMsg
);
}
else
{
}
else
if
(
pMsg
->
event
>=
ATT_CBACK_START
&&
pMsg
->
event
<=
ATT_CBACK_END
)
{
LOG_INFO
(
"ble"
,
"Ble got evt %d: %s"
,
pMsg
->
event
,
att_events
[
pMsg
->
event
-
ATT_CBACK_START
]);
}
else
if
(
pMsg
->
event
>=
L2C_COC_CBACK_START
&&
pMsg
->
event
<=
L2C_COC_CBACK_CBACK_END
)
{
LOG_INFO
(
"ble"
,
"Ble got evt %d: %s"
,
pMsg
->
event
,
l2c_coc_events
[
pMsg
->
event
-
L2C_COC_CBACK_START
]);
}
else
{
LOG_INFO
(
"ble"
,
"Ble got evt %d"
,
pMsg
->
event
);
LOG_INFO
(
"ble"
,
"Ble got evt %d"
,
pMsg
->
event
);
}
}
...
...
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