IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Commit Details
Date: | 2011-04-20 13:13:27 (12 years 11 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | cd59b8524b24acaa9a3f56f50b4a27b573661cb4 |
Message: | prod/: on-going development - prod/Common: added section titles - prod/Common (begin): new command to set up and check the test environment - prof/atben: call "begin" to set up the test environment - prod/Common (spectrum): added the profile - prod/Makefile: convenience commands, for development - prod/atben: run "identify" after checking the GPIOs - prod/atusb: test script for ATUSB |
Files: |
prod/Common (5 diffs) prod/Makefile (1 diff) prod/atben (1 diff) prod/atusb (1 diff) |
Change Details
prod/Common | ||
---|---|---|
26 | 26 | LOCAL_DUT=default |
27 | 27 | fi |
28 | 28 | |
29 | ||
30 | ##### Test setup ############################################################ | |
31 | ||
32 | ||
29 | 33 | step() |
30 | 34 | { |
31 | 35 | echo -n " .... $1" |
... | ... | |
36 | 40 | } |
37 | 41 | |
38 | 42 | |
43 | ##### Test result ########################################################### | |
44 | ||
45 | ||
39 | 46 | finish() |
40 | 47 | { |
41 | 48 | echo "$cmd" >>$LOG |
... | ... | |
73 | 80 | } |
74 | 81 | |
75 | 82 | |
83 | ##### Test execution ########################################################## | |
84 | ||
85 | ||
76 | 86 | cmd() |
77 | 87 | { |
78 | 88 | cmd=$1 |
79 | 89 | } |
80 | 90 | |
81 | 91 | |
92 | ##### Evaluation ############################################################ | |
93 | ||
94 | ||
82 | 95 | expect() |
83 | 96 | { |
84 | 97 | eval "$cmd" >_out 2>&1 || { echo "exit code $?" | fail; exit 1; } |
... | ... | |
95 | 108 | } |
96 | 109 | |
97 | 110 | |
111 | ##### Tests ################################################################# | |
112 | ||
113 | ||
114 | begin() | |
115 | { | |
116 | if [ -z "$1" ]; then | |
117 | echo "usage: begin profile" 1>&2 | |
118 | exit 1 | |
119 | fi | |
120 | PROFILE=$1 | |
121 | if [ ! -r $PROFILE ]; then | |
122 | echo "$PROFILE not found" 1>&2 | |
123 | exit 1 | |
124 | fi | |
125 | } | |
126 | ||
127 | ||
98 | 128 | identify() |
99 | 129 | { |
100 | 130 | step "Identification" |
... | ... | |
108 | 138 | step "Spectrum" |
109 | 139 | # todo: |
110 | 140 | # - trim values (maybe) |
111 | # - profile | |
112 | 141 | # - decide on power |
113 | 142 | # - decide on offset |
114 | cmd "atrf-path -g -T +0.5 $REF $DUT 10" | |
143 | cmd "atrf-path -g -T +0.5 -P $PROFILE $REF $DUT 10" | |
115 | 144 | expect PASS |
116 | 145 | } |
117 | 146 |
prod/Makefile | ||
---|---|---|
1 | # | |
2 | # This Makefile just contains a few convenience commands, for development | |
3 | # | |
4 | ||
5 | ||
6 | .PHONY: all ben usb | |
7 | ||
8 | all: ben | |
9 | ||
10 | ben: ben.profile | |
11 | ./atben net:ben net:jlime | |
12 | ||
13 | usb: usb.profile | |
14 | ./atusb net:ben usb | |
15 | ||
16 | ben.profile: | |
17 | cp ../tools/atrf-path/profile.example $@ | |
18 | ||
19 | usb.profile: | |
20 | cp ../tools/atrf-path/profile.example $@ |
prod/atben | ||
---|---|---|
18 | 18 | } |
19 | 19 | |
20 | 20 | |
21 | identify | |
21 | begin ben.profile | |
22 | 22 | # power ? |
23 | 23 | gpio_ben |
24 | identify | |
24 | 25 | xtal_ben |
25 | 26 | spectrum |
26 | 27 | transmit |
prod/atusb | ||
---|---|---|
1 | #!/bin/sh | |
2 | ||
3 | . ./Common | |
4 | ||
5 | ||
6 | flash() | |
7 | { | |
8 | step "Flash boot loader" | |
9 | todo | |
10 | } | |
11 | ||
12 | ||
13 | enumerate() | |
14 | { | |
15 | step "Enumeration" | |
16 | todo | |
17 | } | |
18 | ||
19 | ||
20 | led() | |
21 | { | |
22 | step "LED" | |
23 | todo | |
24 | } | |
25 | ||
26 | ||
27 | dfu() | |
28 | { | |
29 | step "DFU application" | |
30 | todo | |
31 | } | |
32 | ||
33 | ||
34 | gpio_usb() | |
35 | { | |
36 | step "GPIO scan" | |
37 | todo | |
38 | } | |
39 | ||
40 | ||
41 | xtal_usb() | |
42 | { | |
43 | step "Crystal frequency" | |
44 | todo | |
45 | } | |
46 | ||
47 | ||
48 | begin usb.profile | |
49 | flash | |
50 | enumerate | |
51 | led | |
52 | dfu | |
53 | # power ? | |
54 | gpio_usb | |
55 | # identify # local anomaly (using a 230-based card at the moment) | |
56 | xtal_usb | |
57 | spectrum | |
58 | transmit |