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
External 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
fpletz
firmware
Commits
425d47cf
Verified
Commit
425d47cf
authored
5 years ago
by
schneider
Committed by
rahix
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
chore(ble): Refactoring...
parent
862b4286
No related branches found
Branches containing commit
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.c
+1
-1
1 addition, 1 deletion
epicardium/ble/ble.c
epicardium/ble/ble_main.c
+10
-5
10 additions, 5 deletions
epicardium/ble/ble_main.c
epicardium/ble/stack.c
+1
-4
1 addition, 4 deletions
epicardium/ble/stack.c
with
12 additions
and
10 deletions
epicardium/ble/ble.c
+
1
−
1
View file @
425d47cf
...
...
@@ -4,7 +4,7 @@
#include
"wsf_timer.h"
#include
"wsf_trace.h"
#include
"app_ui.h"
#include
"
fit/fit
_api.h"
#include
"
ble
_api.h"
#include
"hci_vs.h"
#include
"att_defs.h"
...
...
This diff is collapsed.
Click to expand it.
epicardium/ble/ble_main.c
+
10
−
5
View file @
425d47cf
...
...
@@ -220,6 +220,8 @@ static uint16_t fitRscmPeriod = FIT_DEFAULT_RSCM_PERIOD;
/* Heart Rate Monitor feature flags */
static
uint8_t
fitHrmFlags
=
CH_HRM_FLAGS_VALUE_8BIT
|
CH_HRM_FLAGS_ENERGY_EXP
;
static
void
FitHandler
(
wsfEventMask_t
event
,
wsfMsgHdr_t
*
pMsg
);
/*************************************************************************************************/
/*!
* \brief Application DM callback.
...
...
@@ -661,12 +663,12 @@ static void fitProcMsg(fitMsg_t *pMsg)
* \return None.
*/
/*************************************************************************************************/
void
FitHandlerInit
(
wsfHandlerId_t
handlerI
d
)
static
void
FitHandlerInit
(
voi
d
)
{
APP_TRACE_INFO0
(
"FitHandlerInit"
);
/* store handler ID */
fitHandlerId
=
handlerId
;
fitHandlerId
=
WsfOsSetNextHandler
(
FitHandler
)
;
/* Set configuration pointers */
pAppAdvCfg
=
(
appAdvCfg_t
*
)
&
fitAdvCfg
;
...
...
@@ -681,11 +683,11 @@ void FitHandlerInit(wsfHandlerId_t handlerId)
pSmpCfg
=
(
smpCfg_t
*
)
&
fitSmpCfg
;
/* initialize heart rate profile sensor */
HrpsInit
(
h
andlerId
,
(
hrpsCfg_t
*
)
&
fitHrpsCfg
);
HrpsInit
(
fitH
andlerId
,
(
hrpsCfg_t
*
)
&
fitHrpsCfg
);
HrpsSetFlags
(
fitHrmFlags
);
/* initialize battery service server */
BasInit
(
h
andlerId
,
(
basCfg_t
*
)
&
fitBasCfg
);
BasInit
(
fitH
andlerId
,
(
basCfg_t
*
)
&
fitBasCfg
);
}
/*************************************************************************************************/
...
...
@@ -698,7 +700,7 @@ void FitHandlerInit(wsfHandlerId_t handlerId)
* \return None.
*/
/*************************************************************************************************/
void
FitHandler
(
wsfEventMask_t
event
,
wsfMsgHdr_t
*
pMsg
)
static
void
FitHandler
(
wsfEventMask_t
event
,
wsfMsgHdr_t
*
pMsg
)
{
if
(
pMsg
!=
NULL
)
{
...
...
@@ -727,6 +729,9 @@ void FitHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg)
/*************************************************************************************************/
void
FitStart
(
void
)
{
FitHandlerInit
();
/* Register for stack callbacks */
DmRegister
(
fitDmCback
);
DmConnRegister
(
DM_CLIENT_ID_APP
,
fitDmCback
);
...
...
This diff is collapsed.
Click to expand it.
epicardium/ble/stack.c
+
1
−
4
View file @
425d47cf
...
...
@@ -34,7 +34,7 @@
#include
"wsf_types.h"
#include
"wsf_os.h"
#include
"util/bstream.h"
#include
"
fit/fit
_api.h"
#include
"
ble
_api.h"
#include
"hci_handler.h"
#include
"dm_handler.h"
#include
"l2c_handler.h"
...
...
@@ -187,7 +187,4 @@ void StackInitFit(void)
* mixed a lot. */
handlerId
=
WsfOsSetNextHandler
(
AppHandler
);
AppHandlerInit
(
handlerId
);
handlerId
=
WsfOsSetNextHandler
(
FitHandler
);
FitHandlerInit
(
handlerId
);
}
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