- include/cwtest.h (cw_test_needs_reset), lib/cwtest.c
(cw_test_needs_reset): new function to indicate all cases where the
transceiver needs to be reset (instead of using SLP_TR)
- lib/cwtest.c (cw_test_end): use cw_test_needs_reset instead of
open-coding the decision
- lib/cwtest.c (enter_test_mode_230, start_test_mode_231): always wait
for the PLL to lock. Contrary to the assumption in the previous
commit, we should always see this interrupt.
- atrf-path/atrf-path.c (sample): initialize the transceiver if we had
to reset it
- atrf-path/atrf-path.c (sample), atrf-path/atrf-path.c (do_half_sweep):
moved the tTR19 delay to "sweep", so that all branches share it and it
is taken only once
We seem to have a path where the PLL is already locked when we get
there. We thus never get an interrupt and hang.
Pending further investigation, just use a timeout that is longer
than the worst-case PLL lock time.
- atrf-xmit.c (xfer_one): also check that also the sender has no
pending interrupts before we start sending
- atrf-xmit.c (xfer_one): interrupt poll loop (now disabled) checked
the sender, not the receiver. oops.
- atrf-xmit.c (xfer_one): upon reception, check that the sender has
finished (IRQ_TRX_END) as well
- gui.c (old_term, restore_term, raw, get_key): raw and non-blocking
console input
- gui,c (gui): accept console input in addition to keypressed in the
SDL window
- atrf-gpio.c (usage): added newline after synopsis
- atrf-gpio.c (usage): description of option -p was missing
- atrf-gpio.c (main): invocation without patterns/commands is now an
error
- atrf-gpio.c: added section titles
- atrf-gpio.c (DEFAULT_DELAY_MS, reg_op, usage): the "delay" command
now accept an optional delay argument
- atrf-gpio.c (old_term, restore_term, raw, pass_fail): make standard
input non-blocking and raw, and poll for pass/fail input
- atrf-gpio.c (usage, main): new option -c to cycle through the
pattern sequence, waiting for pass/fail input
- atrf-gpio.c (reg_op, usage): new command "delay" to add a 10 ms
delay
- atrf-gpio.c (reg_op, usage): new command "frame" to write one
byte to the frame buffer
- atrf-gpio.c (reg_op, usage): new command "reset" to reset the
transceiver (via atrf_reset_rf)
- atrf-gpio.c (reg_op, usage): new command "slp_tr" to pulse SLP_TR
(via atrf_slp_tr)
- atrf-gpio.c (reg_op, usage): register read can now be followed by a
mask value
ATUSB can't use sleep mode because that would cut the AVR's clock.
The old SiLabs-based boards would not have that issue, but there,
the SLP_TR method is unproven. Besides, reset is as fast on USB.
This, while being slightly unsystematic, reduces the risk of confusing
"1" (one) and "l" (lower-case ell).
- tools/atrf-gpio/atben.c (do_atben), tools/atrf-gpio/atusb.c
(do_atusb): treat 'o' as an alias of 'l'
- tools/atrf-gpio/atrf-gpio.c (usage): list 'o' as alternative for 'l'
- atusb.c (name): clarified that PC3 is unconnected
- atusb.c (gpio): "dir" and "data" were swapped
- atusb.c (gpio): complain if ATUSB_GPIO returns the wrong amount of data
- atusb.c (dump, main): show the pin configuration as well
- atusb.c (dump): show "-" for values where we don't expect a specific
result
- atusb.c (dump): removed extra newline on mismatch
- Makefile: removed limitation to Ben and added host build
- atusb.c: atusb-specific acquisition and calculations
- atrf-xtal.h (do_atusb): interface to atusb.c
- atrf-xtal.c (atben, atusb, main): added switch to board-specific driver
- atrf-xtal.c (usage, main): added support for atusb
This means that we only depend on f32xbase for atusb-sil (defunct) and
cntr (needs updating), but not for any of the project's main parts.
- makefiles/Makefile.basic: copied over from
f32xbase/lib/Makefile.common
- makefiles/Makefile.basic (LDLIBS): removed inclusion of libusb
- tools/Makefile.common: use makefiles/Makefile.basic
- install/INSTALL-Ben, prod/doc/setup.hmac: removed f32xbase
dependency
- gui.c (segment, draw, gui): make caller provide color, to ease sharing
- gui.c (dump, gui): moved call to print_sweep to separate function
- gui.c (DUMP_RGBA, dumps, n_dumps, dump, draw_dumps, gui): record all
dumps and display them in the background
- sweep.h (print_sweep), atrf-path.c (print_sweep): make global, for
sharing with gui.c
- gui.c (gui): dump the sweep results to standard output if "D" is
pressed
- atrf-xtal.c (eval): return the value instead of printing it
- atrf-xtal.c (usage, main): new option -b for reporting the deviation
from a base count
- atrf-xtal.c (eval): new option -p to report an error for deviations
outside the specified bound
Note that the PHY is still half-duplex, but we don't need to insist
on the entire packet reception/transmission to finish before letting
the peer have its say.
- dirtpan.c (open_tun): if a command is given, set the environment
variable ITF to the interface name and system(3) the command
- dirtpan.c (usage, main): accept an interface configuration command as
the 4th command-line argument
Note that we still waste at least one perfectly good frame. However,
instead of implementing some fancy arbitration, it's better if we
just make the whole thing bidirectional in the future.
The IEEE 802.15.4 kernel stack doesn't implement ACKs yet and prints
a warning if we request them. Since dirtpan has its own ACKs, we
just disable IEEE 802.15.4 ACKs for now.
- dirtpan.c (debug_ip): only dump local packets if debug > 1
- dirtpan.c (debug_dirt): dump packet content only if debug > 1
- dirtpan.c (debug_dirt): made packet content dump more readable
- dirtpan.c (debug_dirt): added terse debug output for debug == 1
- dirtpan.c (usage): doubling -d now has a meaning
- usbwait.c (need_removal, wait_for_usb): if need_removal is set, wait
for the device to be removed before trying to find it
- usbwait.c (usage, main): new option -r to set need_removal
- usbwait/usbwait.c: update the USB device tree until the specified
device is detected
- usbwait/Makefile: build usbwait (host only)
- Makefile (DIRS, BEN_DIRS, upload): separated subdirectories with tools
that can run on the Ben from those that can't
- Makefile (DIRS): added usbwait/
- usbopen.c (open_usb): determine vendor and product objective outside
the loop
- usbopen.c (open_usb): check vendor and product only if non-zero
- usbopen.c (bad_id, parse_usb_id): vendor and product can now be
omitted
- tools/include/usbopen.h (usb_rescan), tools/lib/usbopen.c (initialized,
initialize, usb_rescan): usb_rescan forces a re-initialization of
libusb and a new scan of the USB device tree