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
f725fd98
Verified
Commit
f725fd98
authored
5 years ago
by
genofire
Browse files
Options
Downloads
Patches
Plain Diff
ble: card10 svc - final cleanup
parent
83eaf79b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!151
ble: card10 svc - rewrite
Pipeline
#2933
passed
5 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Documentation/bluetooth/card10.rst
+2
-2
2 additions, 2 deletions
Documentation/bluetooth/card10.rst
epicardium/ble/card10.c
+12
-9
12 additions, 9 deletions
epicardium/ble/card10.c
with
14 additions
and
11 deletions
Documentation/bluetooth/card10.rst
+
2
−
2
View file @
f725fd98
...
...
@@ -53,12 +53,12 @@ The current draft uses following service specification:
- LEDS dim bottom characteristic:
UUID: ``42230215-2342-2342-2342-234223422342``
write
write
with response
- LEDs dim top characteristic:
UUID: ``42230216-2342-2342-2342-234223422342``
write
write
with response
- LEDs powersafe characteristic:
...
...
This diff is collapsed.
Click to expand it.
epicardium/ble/card10.c
+
12
−
9
View file @
f725fd98
...
...
@@ -482,7 +482,6 @@ static const attsAttr_t card10SvcAttrList[] =
};
/* clang-format on */
// validating, that the service really get all charateristics
WSF_CT_ASSERT
(
((
sizeof
(
card10SvcAttrList
)
/
sizeof
(
card10SvcAttrList
[
0
]))
==
...
...
@@ -582,12 +581,14 @@ static uint8_t writeCard10CB(
case
CARD10_LEDS_BOTTOM_DIM_VAL_HDL
:
ui8
=
pValue
[
0
];
if
(
ui8
>=
1
&&
ui8
<=
8
)
{
if
(
operation
==
ATT_PDU_WRITE_CMD
||
operation
==
ATT_PDU_SIGNED_WRITE_CMD
||
operation
==
ATT_PDU_WRITE_REQ
||
operation
==
ATT_PDU_EXEC_WRITE_REQ
)
{
if
(
operation
==
ATT_PDU_WRITE_CMD
||
operation
==
ATT_PDU_SIGNED_WRITE_CMD
||
operation
==
ATT_PDU_WRITE_REQ
||
operation
==
ATT_PDU_EXEC_WRITE_REQ
)
{
epic_leds_dim_bottom
(
pValue
[
0
]);
APP_TRACE_INFO1
(
"ble-card10: dim bottom to: %d
\n
"
,
pValue
[
0
]
"ble-card10: dim bottom to: %d
\n
"
,
pValue
[
0
]
);
return
ATT_SUCCESS
;
}
else
if
(
operation
==
ATT_PDU_PREP_WRITE_REQ
)
{
...
...
@@ -613,12 +614,14 @@ static uint8_t writeCard10CB(
case
CARD10_LEDS_TOP_DIM_VAL_HDL
:
ui8
=
pValue
[
0
];
if
(
ui8
>=
1
&&
ui8
<=
8
)
{
if
(
operation
==
ATT_PDU_WRITE_CMD
||
operation
==
ATT_PDU_SIGNED_WRITE_CMD
||
operation
==
ATT_PDU_WRITE_REQ
||
operation
==
ATT_PDU_EXEC_WRITE_REQ
)
{
if
(
operation
==
ATT_PDU_WRITE_CMD
||
operation
==
ATT_PDU_SIGNED_WRITE_CMD
||
operation
==
ATT_PDU_WRITE_REQ
||
operation
==
ATT_PDU_EXEC_WRITE_REQ
)
{
epic_leds_dim_top
(
pValue
[
0
]);
APP_TRACE_INFO1
(
"ble-card10: dim top to: %d
\n
"
,
pValue
[
0
]
"ble-card10: dim top to: %d
\n
"
,
pValue
[
0
]
);
return
ATT_SUCCESS
;
}
else
if
(
operation
==
ATT_PDU_PREP_WRITE_REQ
)
{
...
...
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