Date:2011-01-17 15:33:27 (8 years 8 months ago)
Author:Werner Almesberger
Commit:0dc344a0ec24dc918411c85a7d477635395a7850
Message:removed atben/tools/ (functionality has moved to atrf-id long ago)

Files: atben/tools/Makefile (1 diff)
atben/tools/try.c (1 diff)

Change Details

atben/tools/Makefile
1CC=mipsel-openwrt-linux-gcc
2CFLAGS=-Wall -I../../atrf/fw/include
3
4MAIN = try
5OBJS = $(MAIN).c lib/atusd.o
6
7$(MAIN): $(OBJS)
atben/tools/try.c
1#include <stdint.h>
2#include <stdio.h>
3#include <unistd.h>
4
5#include "at86rf230.h"
6#include "lib/atusd.h"
7
8
9int 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}

Archive Download the corresponding diff file



interactive