Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
bd8d2d3a
Commit
bd8d2d3a
authored
9 years ago
by
Martine Lenders
Browse files
Options
Downloads
Patches
Plain Diff
cc110x: adapt for info struct
parent
8db42427
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
drivers/cc110x/cc110x-netdev2.c
+4
-1
4 additions, 1 deletion
drivers/cc110x/cc110x-netdev2.c
drivers/cc110x/include/cc110x-netdev2.h
+4
-0
4 additions, 0 deletions
drivers/cc110x/include/cc110x-netdev2.h
with
8 additions
and
1 deletion
drivers/cc110x/cc110x-netdev2.c
+
4
−
1
View file @
bd8d2d3a
...
...
@@ -47,11 +47,12 @@ static int _send(netdev2_t *dev, const struct iovec *vector, int count)
return
cc110x_send
(
&
netdev2_cc110x
->
cc110x
,
cc110x_pkt
);
}
static
int
_recv
(
netdev2_t
*
dev
,
char
*
buf
,
int
len
)
static
int
_recv
(
netdev2_t
*
dev
,
char
*
buf
,
int
len
,
void
*
info
)
{
DEBUG
(
"%s:%u
\n
"
,
__func__
,
__LINE__
);
cc110x_t
*
cc110x
=
&
((
netdev2_cc110x_t
*
)
dev
)
->
cc110x
;
netdev2_cc110x_rx_info_t
*
cc110x_info
=
info
;
cc110x_pkt_t
*
cc110x_pkt
=
&
cc110x
->
pkt_buf
.
packet
;
if
(
cc110x_pkt
->
length
>
len
)
{
...
...
@@ -59,6 +60,8 @@ static int _recv(netdev2_t *dev, char* buf, int len)
}
memcpy
(
buf
,
(
void
*
)
cc110x_pkt
,
cc110x_pkt
->
length
);
cc110x_info
->
rssi
=
cc110x
->
pkt_buf
.
rssi
;
cc110x_info
->
lqi
=
cc110x
->
pkt_buf
.
lqi
;
return
cc110x_pkt
->
length
;
}
...
...
This diff is collapsed.
Click to expand it.
drivers/cc110x/include/cc110x-netdev2.h
+
4
−
0
View file @
bd8d2d3a
...
...
@@ -43,6 +43,10 @@ typedef struct netdev2_cc110x {
cc110x_t
cc110x
;
/**< documentation here */
}
netdev2_cc110x_t
;
/**
* @brief Received packet status information for cc110x radios
*/
typedef
struct
netdev2_radio_rx_info
netdev2_cc110x_rx_info_t
;
/**
* @brief netdev2 <-> cc110x glue code initialization function
...
...
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