- lib/cwtest.c (enter_test_mode_231, prepare_test_mode_231,
start_test_mode_231, cw_test_begin): broke enter_test_mode_231 into
a slow setup component and a fast start/resume component
- include/cwtest.h (cw_test_resume), lib/cwtest.c (cw_test_resume):
resume transmission in a previously set up test mode
atrf-path -g ... 10 10 time:
before 2.08 s
after 1.92-1.93 s (92-93%)
- atrf-path.c (set_channel, init_common): moved setting of the channel
to separate function, for better granularity
- atrf-path.c (init_common, init_tx, init_rx, sample, do_sweep): the
init_* functions no longer set the channel; use set_channel
- atrf-path.c (main): initialize the receiver only once
- atrf-path.c (usage, main): new option -g to invoke the GUI
- atrf-path.c (usage, main): in GUI mode, the number of sweeps is optional
(default: infinite)
- atrf-path.c (main), gui.h (gui), gui.c (gui): exit after the specified
number of sweeps
The transceiver reset takes quite a while. It seems that also going into
sleep mode has the effect of stopping cw test mode and it's much faster.
This has only been tried on the AT86RF231. For AT86RF230, we therefore
still use the reset.
Performance improvement:
Measurement: atrf-path sweep time in GUI mode, averaging over 10 samples.
Running on PC with remote ATBEN transceivers.
before 7.36-7.68 s
after 2.08 s (27-28% of previous time)
- gui.h, gui.c: plot sweep results with SDL_gfx
- Makefile: added target-specific variables for SDL and SDL_gfx
- atrf-path.c (main): invoke the GUI if the number of sweeps is zero
- sweep.h (struct sweep ), atrf-path.c (sample, do_sweeps, main): pass
sweep parameters via a struct
- sweep.h (do_sweep), atrf-path.c (do_sweep, do_sweeps): separated single
sweep and made it public
- sweep.h (struct sample), atrf-path.c (sample, print_sweep, do_sweeps):
made "sample" and do_sweep return the sample value/vector and moved
output from "sample" to print_sweep
- atrf-path.c (rssi_to_dBm, sample): moved RSSI value to dBm conversion to
separate function
- atrf-path.c (sample): corrected calculation of average
- atrf-path.c (sample): also output minimum and maximum value
- plot: new option -e to display extremal values
- plot: added comment to explain y range
- lib/misctxrx.c (tx_pwr_230, tx_pwr_231): declare tables as "const"
- lib/misctxrx.c (POWER_TABLE_SIZE, set_power_dBm): don't open-code the
table size calculation
- lib/misctxrx.c (tx_power_table, set_power_dBm): moved transmit power
table selection out of set_power_dBm
- include/misctxrx.h (tx_power_dBm2step, tx_power_step2dBm),
lib/misctxrx.c (tx_power_dBm2step, tx_power_step2dBm, set_power_dBm):
moved conversion functions out of set_power_dBm and made them globally
available
- atrf-txrx/atrf-txrx.c (tx_pwr_230, tx_pwr_231, set_power): moved to
lib/misctxrx.c
- include/misctxrx.h, lib/misctxr.c (set_power_step, set_power_dBm):
separated dBm to index conversion from the actual operation
- atrf-txrx/atrf-txrx.c (main): use new set_power_dBm instead of old
set_power
- atnet.c: introduced descriptor structure, replacing direct netio handle
- atnet.c (reply, error): moved global variables into descriptor
- atnet.c (atnet_reg_read, atnet_interrupt): when complaining about an
invalid response, skip the leading "+"
- atusb.c: introduced descriptor structure, replacing direct USB device
handle
- atusb.c (error): moved global variable into descriptor
- driver.h (atusb_dev_handle), atusb.c (atusb_dev_handle), atrf.c
(atrf_usb_handle): call driver to perform the no longer trivial
translation
- atnet.c: driver "net", which accessed hardware via atrf-proxy
- Makefile (OBJS): added atnet.o
- driver.h (atnet_driver), atrf.c (drivers): added the atnet driver
- atrf.c (drivers): moved the driver list closer to the top
- usbopen.h (usb_unrestrict), usbusb.c (usb_unrestrict): drop ID and
path restrictions
- atusb.c (atusb_open): call usb_unrestrict to remove restrictions
- lib/Makefile (OBJS), include/cwtest.h (cw_test_begin, cw_test_end),
lib/cwtest.c (enter_test_mode_230, enter_test_mode_231,
cw_test_begin, cw_test_end): moved constant wave test mode setup
over from atrf-txrx.c
- atrf-txrx/atrf-txrx.c (transmit_pattern): use functions from cwtest.o
Examples:
usb:1/6 select logical device 6 on bus 1
usb:1-3.1.4 starting at bus 1, choose ports 3, 1, and 4
- usbopen.c (initialize, open_usb): moved libusb initialization to
separate function, to allow for sharing
- usbopen.h (restrict_usb_path), usbopen.c (restricted_path, open_usb,
restrict_usb_dev, restrict_usb_by_dev, read_num, restrict_usb_by_port,
restrict_usb_path): added mechanism to restrict USB path
- atusb.c (atusb_open): if an argument is given, call restrict_usb_path
with it
We shared it across projects so far, but since the code will be further
customized, it's better to keep it local (at least for a while).
- usbopen.h, usbopen.c: moved over f32xbase/include/usb.h and
f32xbase/lib/usb.c (for further customization)
- Makefile (CFLAGS, OBJS_host): use usbopen.o instead of usb.o from
f32xbase
- atusb.c: use usbopen.h instead of usb.h from f32xbase (also removes
include path ambiguity)
- include/atrf.h (atrf_ben_regs), lib/atrf.c (atrf_ben_regs),
lib/driver.h (atben_regs), lib/atben.c (atben_regs): new function to
get the mmap'ed registers in a less disgusting way
- atrf-xtal/atben.c (base, ben_setup): cleaned up the horrible layering
violation
- include/atrf.h (atrf_default_driver_name),
lib/atrf.c (atrf_default_driver_name): return the name of the default
driver, or "none" if no drivers are defined
Case-sensitive is the Unix way, and so is avoiding unnecessary upper-case.
- atben.c (atben_driver): changed name from "Ben" to "ben"
- atusb.c (atusb_driver): changed name from "USB" to "usb"
- atrf.c (select_driver): made driver name matching case-sensitive
atrf_open(NULL) maintains the old behaviour. To select a driver, use
atrf_open("name") or atrf_open("name:driver-specific-arguments")
The driver name is "ben" or "usb".
- include/atrf.h (atrf_open), lib/atrf.c (do_atrf_open, atrf_open):
atrf_open now requires the string argument for driver selection
- atrf-id/atrf-id.c (main), atrf-reset/atrf-reset.c (main),
atrf-rssi/atrf-rssi.c (main), atrf-trim/atrf-trim.c (main),
atrf-txrx/atrf-txrx.c (main), atrf-xtal/atrf-xtal.c (main):
changed atrf_open() to atrf_open(NULL)
- atrf.c (atrf_open, select_driver, do_atrf_open): added infrastructure
for passing the driver name and further parameters to atrf_open
- atrf.c (struct atrf_dsc): made "driver" constant
- driver.h (struct atrf_driver), atben.c (atben_open), atusb.c
(atusb_open): added string argument to the "open" function
- atusb.c (atusb_driver): corrected unterminated comment
- Makefile (DIRS): added atrf-xtal
- atrf-xtal/Makefile: build atrf-xtal for the Ben or do nothing elsewhere
- atrf-xtal/atrf-xtal.h, atrf-xtal/atrf-xtal.c: diagnostic utility to
determine the transceiver's crystal frequency
- atrf-xtal/atben.c: dirty low-level driver for ATBEN
- include/atrf.h, lib/atrf.c (atrf_slp_tr): new function to set the SLP_TR
line
- lib/driver.h (struct atrf_driver): added driver function slp_tr
- lib/atusb.c (atusb_driver): we dont support slp_tr yet
- lib/atben.c (atben_slp_tr, atben_driver): implement SLP_TR control