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
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
Jeff Gough
firmware
Commits
00578959
Commit
00578959
authored
5 years ago
by
Hauke Mehrtens
Browse files
Options
Downloads
Patches
Plain Diff
BLE: FileTrans: Use LOG_ERR
Replace printf with LOG_ERR. Signed-off-by:
Hauke Mehrtens
<
hauke@hauke-m.de
>
parent
2a542de3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
epicardium/ble/filetransfer.c
+17
-10
17 additions, 10 deletions
epicardium/ble/filetransfer.c
with
17 additions
and
10 deletions
epicardium/ble/filetransfer.c
+
17
−
10
View file @
00578959
...
...
@@ -33,6 +33,7 @@
#include
"hci_vs.h"
#include
<epicardium.h>
#include
"modules/log.h"
#include
"util/bstream.h"
#include
"att_api.h"
...
...
@@ -218,9 +219,11 @@ static void sendCrcResponse(
msg
,
sizeof
(
answer
)
-
len
);
len
+=
strlen
(
msg
);
printf
(
"BLE
file
trans
fer:
%s
\n
"
,
msg
);
LOG_ERR
(
"
filetrans
"
,
"
%s
\n
"
,
msg
);
}
else
{
printf
(
"error message
\"
%s
\"
too long
\n
"
,
msg
);
LOG_ERR
(
"filetrans"
,
"error message
\"
%s
\"
too long
\n
"
,
msg
);
}
}
...
...
@@ -251,9 +254,10 @@ static int bleFileCreateOrOpen(char *filepath)
if
(
ret
==
-
ENOENT
)
{
ret
=
epic_file_mkdir
(
filepath
);
if
(
ret
)
{
printf
(
"mkdir failed: %s, ret: %i
\n
"
,
filepath
,
ret
);
LOG_ERR
(
"filetrans"
,
"mkdir failed: %s, ret: %i
\n
"
,
filepath
,
ret
);
return
ret
;
}
}
...
...
@@ -341,8 +345,9 @@ static uint8_t handleCentralTX(
}
else
if
(
operation
!=
ATT_PDU_EXEC_WRITE_REQ
&&
operation
!=
ATT_PDU_WRITE_CMD
)
{
printf
(
"operation 0x%x not supported, try normal write
\n
"
,
operation
);
LOG_ERR
(
"filetrans"
,
"operation 0x%x not supported, try normal write
\n
"
,
operation
);
return
ATT_ERR_INVALID_PDU
;
}
...
...
@@ -370,7 +375,7 @@ static uint8_t handleCentralTX(
return
ATT_SUCCESS
;
case
'E'
:
printf
(
"Error was acked"
);
LOG_ERR
(
"filetrans"
,
"Error was acked"
);
return
ATT_SUCCESS
;
default:
...
...
@@ -401,7 +406,9 @@ static uint8_t writeCallback(
connId
,
handle
,
operation
,
offset
,
len
,
pValue
,
pAttr
);
default:
printf
(
"unsupported characteristic: %c
\n
"
,
handle
);
LOG_ERR
(
"filetrans"
,
"unsupported characteristic: %c
\n
"
,
handle
);
return
ATT_ERR_HANDLE
;
}
}
...
...
@@ -413,7 +420,7 @@ static uint8_t readCallback(
uint16_t
offset
,
attsAttr_t
*
pAttr
)
{
printf
(
"read callback
\n
"
);
LOG_ERR
(
"filetrans"
,
"read callback
\n
"
);
return
ATT_SUCCESS
;
}
...
...
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