-
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.
updating ioctls to actually set channel and address
- Loading branch information
1 parent
c01a316
commit fe3f736
Showing
7 changed files
with
98 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,26 @@ | ||
#include <asm/ioctl.h> | ||
|
||
#include <linux/types.h> | ||
#define BASE 0xCC | ||
|
||
#ifndef __KERNEL__ | ||
#include <inttypes.h> | ||
typedef uint8_t u8; | ||
typedef uint16_t u16; | ||
typedef uint64_t u64; | ||
#endif | ||
|
||
struct cc2520_set_channel_data { | ||
u8 channel; | ||
}; | ||
|
||
struct cc2520_set_address_data { | ||
u16 short_addr; | ||
u64 extended_addr; | ||
u16 pan_id; | ||
}; | ||
|
||
#define CC2520_IO_RADIO_INIT _IO(BASE, 0) | ||
#define CC2520_IO_RADIO_ON _IO(BASE, 1) | ||
#define CC2520_IO_RADIO_OFF _IO(BASE, 2) | ||
#define CC2520_IO_RADIO_OFF _IO(BASE, 2) | ||
#define CC2520_IO_RADIO_SET_CHANNEL _IOW(BASE, 3, struct cc2520_set_channel_data) | ||
#define CC2520_IO_RADIO_SET_ADDRESS _IOW(BASE, 4, struct cc2520_set_address_data) |
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