IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Git Source Tree
Root/
Source at commit 6ac916853526708980131b5f1410e48fc965b45c created 13 years 2 months ago. By Werner Almesberger, atusd.brd: rearranged component references and values for printing/display | |
---|---|
1 | #include <stdint.h> |
2 | #include <stdio.h> |
3 | #include <unistd.h> |
4 | |
5 | #include "at86rf230.h" |
6 | #include "lib/atusd.h" |
7 | |
8 | |
9 | int main(void) |
10 | { |
11 | struct atusd_dsc *dsc; |
12 | uint8_t part, version, man_id_0, man_id_1; |
13 | |
14 | dsc = atusd_open(); |
15 | |
16 | atusd_cycle(dsc); |
17 | // atusd_reset(dsc); |
18 | |
19 | part = atusd_reg_read(dsc, REG_PART_NUM); |
20 | version = atusd_reg_read(dsc, REG_VERSION_NUM); |
21 | man_id_0 = atusd_reg_read(dsc, REG_MAN_ID_0); |
22 | man_id_1 = atusd_reg_read(dsc, REG_MAN_ID_1); |
23 | printf("part 0x%02x version %u manufacturer xxxx%02x%02x\n", |
24 | part, version, man_id_1, man_id_0); |
25 | |
26 | atusd_close(dsc); |
27 | |
28 | return 0; |
29 | } |
30 |