-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checkpoint on implementation of better layer implementation
- Loading branch information
1 parent
e3431c6
commit ed8c28d
Showing
13 changed files
with
241 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef INTERFACE_H | ||
#define iNTERFACE_H | ||
|
||
// Interface | ||
int cc2520_interface_init(void); | ||
void cc2520_interface_free(void); | ||
|
||
extern struct cc2520_interface *interface_bottom; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#include <linux/types.h> | ||
#include "lpl.h" | ||
#include "cc2520.h" | ||
|
||
struct cc2520_interface *lpl_top; | ||
struct cc2520_interface *lpl_bottom; | ||
|
||
static int cc2520_lpl_tx(u8 * buf, u8 len); | ||
static void cc2520_lpl_tx_done(u8 status); | ||
static void cc2520_lpl_rx_done(u8 *buf, u8 len); | ||
|
||
int cc2520_lpl_init() | ||
{ | ||
lpl_top->tx = cc2520_lpl_tx; | ||
lpl_bottom->tx_done = cc2520_lpl_tx_done; | ||
lpl_bottom->rx_done = cc2520_lpl_rx_done; | ||
|
||
return 0; | ||
} | ||
|
||
void cc2520_lpl_free() | ||
{ | ||
|
||
} | ||
|
||
static int cc2520_lpl_tx(u8 * buf, u8 len) | ||
{ | ||
return lpl_bottom->tx(buf, len); | ||
} | ||
|
||
static void cc2520_lpl_tx_done(u8 status) | ||
{ | ||
lpl_top->tx_done(status); | ||
} | ||
|
||
static void cc2520_lpl_rx_done(u8 *buf, u8 len) | ||
{ | ||
lpl_top->rx_done(buf, len); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef LPL_H | ||
#define LPL_H | ||
|
||
#include "cc2520.h" | ||
|
||
extern struct cc2520_interface *lpl_top; | ||
extern struct cc2520_interface *lpl_bottom; | ||
|
||
int cc2520_lpl_init(void); | ||
void cc2520_lpl_free(void); | ||
|
||
#endif |
Oops, something went wrong.