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
3ad19596
Commit
3ad19596
authored
9 years ago
by
Kaspar Schleiser
Browse files
Options
Downloads
Patches
Plain Diff
drivers: netdev2: rename isr_arg
parent
d7b17684
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/include/net/netdev2.h
+4
-1
4 additions, 1 deletion
drivers/include/net/netdev2.h
sys/net/gnrc/link_layer/netdev2/gnrc_netdev2.c
+2
-2
2 additions, 2 deletions
sys/net/gnrc/link_layer/netdev2/gnrc_netdev2.c
with
6 additions
and
3 deletions
drivers/include/net/netdev2.h
+
4
−
1
View file @
3ad19596
...
...
@@ -101,11 +101,14 @@ typedef void (*netdev2_event_cb_t)(netdev2_t *dev, netdev2_event_t event);
*
* Supposed to be extended by driver implementations.
* The extended structure should contain all variable driver state.
*
* Contains a field @p context which is not used by the drivers, but supposed to
* be used by upper layers to store reference information.
*/
struct
netdev2
{
const
struct
netdev2_driver
*
driver
;
/**< ptr to that driver's interface. */
netdev2_event_cb_t
event_callback
;
/**< callback for device events */
void
*
isr_arg
;
/**<
argument to pass on isr even
t */
void
*
context
;
/**<
ptr to network stack contex
t */
#ifdef MODULE_NETSTATS_L2
netstats_t
stats
;
/**< transceiver's statistics */
#endif
...
...
This diff is collapsed.
Click to expand it.
sys/net/gnrc/link_layer/netdev2/gnrc_netdev2.c
+
2
−
2
View file @
3ad19596
...
...
@@ -48,7 +48,7 @@ static void _pass_on_packet(gnrc_pktsnip_t *pkt);
*/
static
void
_event_cb
(
netdev2_t
*
dev
,
netdev2_event_t
event
)
{
gnrc_netdev2_t
*
gnrc_netdev2
=
(
gnrc_netdev2_t
*
)
dev
->
isr_arg
;
gnrc_netdev2_t
*
gnrc_netdev2
=
(
gnrc_netdev2_t
*
)
dev
->
context
;
if
(
event
==
NETDEV2_EVENT_ISR
)
{
msg_t
msg
;
...
...
@@ -122,7 +122,7 @@ static void *_gnrc_netdev2_thread(void *args)
/* register the event callback with the device driver */
dev
->
event_callback
=
_event_cb
;
dev
->
isr_arg
=
(
void
*
)
gnrc_netdev2
;
dev
->
context
=
(
void
*
)
gnrc_netdev2
;
/* register the device to the network stack*/
gnrc_netif_add
(
thread_getpid
());
...
...
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