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
da79038c
Verified
Commit
da79038c
authored
5 years ago
by
schneider
Committed by
rahix
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
docs(ble): Add some notes to the stack init
parent
48120d1f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!47
BLE FreeRTOS integration + Demo
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
epicardium/modules/ble_stack_fit.c
+26
-0
26 additions, 0 deletions
epicardium/modules/ble_stack_fit.c
with
26 additions
and
0 deletions
epicardium/modules/ble_stack_fit.c
+
26
−
0
View file @
da79038c
...
...
@@ -17,6 +17,18 @@
*/
/*************************************************************************************************/
/*
* This file initializes the different components of the whole BLE stack. This inlucdes link level,
* HCI, security, etc...
*
* This file has been copied from lib/sdk/Applications/EvKitExamples/BLE_fit/stack_fit.c
*
* NOTE: Different stack_*.c files in the SDK initialize different components. We have to
* be very carefull to intitialize all needed components here. Think e.g. SecRandInit() ...
*
* Many components are related to the role of the device. Different components need to be
* initialized for central and peripheral roles.
*/
#include
<stdio.h>
#include
<string.h>
#include
"wsf_types.h"
...
...
@@ -37,8 +49,10 @@
#include
"sec_api.h"
#include
"ll_init_api.h"
/* TODO: card10: Where does this number come from? Is there any documentation? */
#define LL_IMPL_REV 0x2303
/* TODO: card10: Where does this number come from? Is there any documentation? */
#define LL_MEMORY_FOOTPRINT 0xC152
uint8_t
LlMem
[
LL_MEMORY_FOOTPRINT
];
...
...
@@ -97,6 +111,7 @@ void StackInitFit(void)
{
wsfHandlerId_t
handlerId
;
/* card10: We do not use the SDMA HCI at the moment. The block below is not compiled. */
#ifndef ENABLE_SDMA
uint32_t
memUsed
;
...
...
@@ -124,6 +139,14 @@ void StackInitFit(void)
}
#endif
/* card10:
* These calls register a queue for callbacks in the OS abstraction
* and then pass a handle down to modules which uses them to
* internally handle callbacks.
*
* No idea why the modules don't call WsfOsSetNextHandler()
* internally ... */
handlerId
=
WsfOsSetNextHandler
(
HciHandler
);
HciHandlerInit
(
handlerId
);
...
...
@@ -159,6 +182,9 @@ void StackInitFit(void)
SmprScInit
();
HciSetMaxRxAclLen
(
100
);
/* card10:
* Here it gets weird: application logic and stack are
* mixed a lot. */
handlerId
=
WsfOsSetNextHandler
(
AppHandler
);
AppHandlerInit
(
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