mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-26 13:59:42 +02:00
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
This commit is contained in:
parent
04db5e0418
commit
cd59b8524b
33
prod/Common
33
prod/Common
@ -26,6 +26,10 @@ else
|
||||
LOCAL_DUT=default
|
||||
fi
|
||||
|
||||
|
||||
##### Test setup ############################################################
|
||||
|
||||
|
||||
step()
|
||||
{
|
||||
echo -n " .... $1"
|
||||
@ -36,6 +40,9 @@ step()
|
||||
}
|
||||
|
||||
|
||||
##### Test result ###########################################################
|
||||
|
||||
|
||||
finish()
|
||||
{
|
||||
echo "$cmd" >>$LOG
|
||||
@ -73,12 +80,18 @@ todo()
|
||||
}
|
||||
|
||||
|
||||
##### Test execution ##########################################################
|
||||
|
||||
|
||||
cmd()
|
||||
{
|
||||
cmd=$1
|
||||
}
|
||||
|
||||
|
||||
##### Evaluation ############################################################
|
||||
|
||||
|
||||
expect()
|
||||
{
|
||||
eval "$cmd" >_out 2>&1 || { echo "exit code $?" | fail; exit 1; }
|
||||
@ -95,6 +108,23 @@ expect_re()
|
||||
}
|
||||
|
||||
|
||||
##### Tests #################################################################
|
||||
|
||||
|
||||
begin()
|
||||
{
|
||||
if [ -z "$1" ]; then
|
||||
echo "usage: begin profile" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
PROFILE=$1
|
||||
if [ ! -r $PROFILE ]; then
|
||||
echo "$PROFILE not found" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
identify()
|
||||
{
|
||||
step "Identification"
|
||||
@ -108,10 +138,9 @@ spectrum()
|
||||
step "Spectrum"
|
||||
# todo:
|
||||
# - trim values (maybe)
|
||||
# - profile
|
||||
# - decide on power
|
||||
# - decide on offset
|
||||
cmd "atrf-path -g -T +0.5 $REF $DUT 10"
|
||||
cmd "atrf-path -g -T +0.5 -P $PROFILE $REF $DUT 10"
|
||||
expect PASS
|
||||
}
|
||||
|
||||
|
20
prod/Makefile
Normal file
20
prod/Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
#
|
||||
# This Makefile just contains a few convenience commands, for development
|
||||
#
|
||||
|
||||
|
||||
.PHONY: all ben usb
|
||||
|
||||
all: ben
|
||||
|
||||
ben: ben.profile
|
||||
./atben net:ben net:jlime
|
||||
|
||||
usb: usb.profile
|
||||
./atusb net:ben usb
|
||||
|
||||
ben.profile:
|
||||
cp ../tools/atrf-path/profile.example $@
|
||||
|
||||
usb.profile:
|
||||
cp ../tools/atrf-path/profile.example $@
|
@ -18,9 +18,10 @@ xtal_ben()
|
||||
}
|
||||
|
||||
|
||||
identify
|
||||
begin ben.profile
|
||||
# power ?
|
||||
gpio_ben
|
||||
identify
|
||||
xtal_ben
|
||||
spectrum
|
||||
transmit
|
||||
|
58
prod/atusb
Executable file
58
prod/atusb
Executable file
@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./Common
|
||||
|
||||
|
||||
flash()
|
||||
{
|
||||
step "Flash boot loader"
|
||||
todo
|
||||
}
|
||||
|
||||
|
||||
enumerate()
|
||||
{
|
||||
step "Enumeration"
|
||||
todo
|
||||
}
|
||||
|
||||
|
||||
led()
|
||||
{
|
||||
step "LED"
|
||||
todo
|
||||
}
|
||||
|
||||
|
||||
dfu()
|
||||
{
|
||||
step "DFU application"
|
||||
todo
|
||||
}
|
||||
|
||||
|
||||
gpio_usb()
|
||||
{
|
||||
step "GPIO scan"
|
||||
todo
|
||||
}
|
||||
|
||||
|
||||
xtal_usb()
|
||||
{
|
||||
step "Crystal frequency"
|
||||
todo
|
||||
}
|
||||
|
||||
|
||||
begin usb.profile
|
||||
flash
|
||||
enumerate
|
||||
led
|
||||
dfu
|
||||
# power ?
|
||||
gpio_usb
|
||||
# identify # local anomaly (using a 230-based card at the moment)
|
||||
xtal_usb
|
||||
spectrum
|
||||
transmit
|
Loading…
Reference in New Issue
Block a user