1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-07-08 03:29:30 +03:00
Commit Graph

944 Commits

Author SHA1 Message Date
Werner Almesberger
7a8ca1b50b Updated profiles (atben, atusb, atusb-sil, cntr) for move of qfn.fpd and qfp.fpd 2011-08-14 00:47:17 -03:00
Werner Almesberger
7605d8c9c8 tools/atrf-txrx/atrf-txrx.c (main): removed endless loop in mode_hmac
That was for debugging. Oops.
2011-07-13 15:34:28 -03:00
Werner Almesberger
8f8c4140ac tools/lib/atusb-common.c (atusb_tx): wait for and receive the TX completion 2011-07-13 15:03:28 -03:00
Werner Almesberger
eeeb5599f8 atusb/fw/mac.c: reserved code 0 and added notification of TX completion
- mac.c (queued_tx_ack, rx_done, handle_irq): on TX completion, send a
  a zero byte on EP 1
- mac.c (handle_irq): don't receive zero-sized frames (they're
  malformed anyway), so that size zero can be used to signal TX
  completion
2011-07-13 14:22:49 -03:00
Werner Almesberger
23c24f65aa Merge branch 'master' of projects.qi-hardware.com:ben-wpan
Conflicts:
	atusb/fw/board_app.c
2011-07-12 17:50:48 -03:00
Werner Almesberger
da7803a746 atusb/fw/: some small "HardMAC" fixes 2011-07-12 17:48:17 -03:00
Werner Almesberger
5621282eb8 tools/atrf-txrx/: added option -H to enter simple HardMAC mode
- atrf-txrx.c (receive_hmac, transmit_hmac): HardMAC send/receive
  functions
- atrf-txrx.c (usage, main): new option -H to use HardMAC
2011-07-12 17:46:24 -03:00
Werner Almesberger
49d6067e88 tools/lib/: added HardMAC functions to the atusb drivers 2011-07-12 17:46:11 -03:00
Werner Almesberger
862b554e2d libatrf: added HardMAC functions
This function set isn't really usable for real communication. Its main
purpose is to help with testing the firmware.

- tools/lib/driver.h (struct atrf_driver): added driver functions for
  HardMAC access
- tools/include/atrf.h (atrf_rx_mode, atrf_rx, atrf_tx),
  tools/lib/atrf.c: functions to enable/disable HardMAC mode and to
  send/receive frames
2011-07-12 17:45:59 -03:00
Werner Almesberger
c1071309d8 atusb/fw/: added "HardMAC" support (not yet using the TRX's MAC)
- include/atusb/ep0.h (enum atspi_requests), ep0.c (my_setup): added
  new "HardMAC" requests ATUSB_RX_MODE and ATUSB_TX
- mac.h, mac.c: basic "HardMAC" procedure
- board_app.c (INT0_vect): call MAC-specific interrupt handler if
  provided
- Makefile (OBJS): added mac.o
2011-07-12 12:26:07 -03:00
Werner Almesberger
e700b81642 atusb/fw/Makefile (bindist): new target to upload and describe atusb.bin 2011-07-12 12:26:07 -03:00
Werner Almesberger
7cae01bc0e atusb/fw/board_app.c (INT0_vect): limit interrupt serials to 0x80-0xff
This leaves the range 0x00-0x7f for other uses.
2011-07-12 12:25:53 -03:00
Werner Almesberger
1ad8683858 atusb/fw/Makefile (bindist): new target to upload and describe atusb.bin 2011-07-12 05:39:49 -03:00
Werner Almesberger
c47f52d6ca atusb/fw/board_app.c (INT0_vect): limit interrupt serials to 0x00-0x7f
This leaves the range 0x80-0xff for other uses.
2011-07-12 04:40:03 -03:00
Werner Almesberger
97604d70f2 tools/usbperf/: measure the rate of control transfers a device can do 2011-07-09 23:14:41 -03:00
Werner Almesberger
f586be4fd6 install/INSTALL-PC: updated lists of config options to enable 2011-07-08 02:27:53 -03:00
Werner Almesberger
42483d67b4 atusb/fw/: added improved support for interrupt synchronization
At an interrupt barrier, the host must be able to ensure that no
interrupt generated before reaching the barrier is still pending and
will be delivered after crossing the barrier.

For this, we introduce the following concept:

- interrupts have a serial number. This number is sent to the host
  on EP 1 (currently bulk) to signal the interrupt, instead of the
  zero byte we used previously.

- the new request ATUSB_SPI_WRITE2_SYNC returns the interrupt
  serial number from after the register write (the register write
  itself is the interrupt barrier).

- the host can now check if the serial indicated from bulk and the
  serial from ATUSB_SPI_WRITE2_SYNC are the same. If yes, interrupts
  are synchronized. If not, it has to wait for the interrupt to be
  signaled on EP 1.

We should also consider the case that the interrupt serial has gotten
ahead of ATUSB_SPI_WRITE2_SYNC. But that seems to happen rarely. In
any case, it's something for the host driver to worry about, not for
the firmware.

- board.h (irq_serial), board_app.c (irq_serial, INT0_vect): count
  the interrupt serial number and return it when signaling the
  interrupt
- include/atusb/ep0.h (ATUSB_SPI_WRITE2_SYNC), ep0.c (my_setup):
  new request ATUSB_SPI_WRITE2_SYNC that does a register write, then
  returns the interrupt serial
2011-07-07 15:51:07 -03:00
Werner Almesberger
50595979f5 Revert "tools/atrf-id/atrf-id.c: new option -D to read atusb debug log"
This reverts commit 391c37f587.

The log isn't so useful in its present state because we may have to
unplug/replug to get out of a troublesome condition.
2011-07-05 19:40:43 -03:00
Werner Almesberger
ead7ade51e Revert "atusb/fw/: added optional debug log with request ATUSB_READ_LOG"
This reverts commit 39e3d4e61a.

The log isn't so useful in its present state because we may have to
unplug/replug to get out of a troublesome condition.
2011-07-05 19:39:25 -03:00
Werner Almesberger
391c37f587 tools/atrf-id/atrf-id.c: new option -D to read atusb debug log 2011-07-05 18:53:32 -03:00
Werner Almesberger
39e3d4e61a atusb/fw/: added optional debug log with request ATUSB_READ_LOG 2011-07-05 18:52:56 -03:00
Werner Almesberger
e610a9ec20 TODO: removed EPERM, added usb_read_bulk vs. signal, toolchain, DFU on U1010 2011-07-05 08:28:20 -03:00
Werner Almesberger
f535a80c56 tools/lib/atben.c: check if the 8:10 slot is available and fail if it isn't
- atben.c (MMC_PATH, AT86RF230_PATH, find_file, slot_in_use): check
  if the MMC or AT86RF230 kernel driver uses the 8:10 card slot and
  print a detailed error message if it is
- atben.c (atben_open): fail if the 8:10 card slot is busy
2011-07-05 07:47:56 -03:00
Werner Almesberger
17f7b66f7b install/INSTALL-Ben: switch linux-zigbee tools source from (old) tarball to git 2011-07-05 07:24:59 -03:00
Werner Almesberger
1615375dce tools/lib/atusb-common.c (atusb_open): give more detailed error message on EPERM 2011-07-05 00:17:20 -03:00
Werner Almesberger
e549ee4911 AUTHORS: werner@openmoko.org is now werner@almesberger.net 2011-07-04 22:53:28 -03:00
Werner Almesberger
298f0848c7 COPYING mentioned COPYING.GPLv2, COPYING.LGPLv21 which weren't included. Added them. 2011-07-04 22:51:17 -03:00
Werner Almesberger
f279907156 Merge branch 'master' of projects.qi-hardware.com:ben-wpan 2011-07-04 20:36:32 -03:00
Werner Almesberger
10f618ac60 tools/atrf-rssi/gui.c (gui): accept keyboard input both from stdin and SDL 2011-07-04 20:29:22 -03:00
Werner Almesberger
56f8b2d038 tools/: moved get_key from atrf-path/gui.c to libatrf, for sharing
The old "raw" function becomes get_key_init. Calling get_key_init is
only necessary if one wants to control the moment standard input is
switched to raw mode. If get_key is invoked without a prior call to
get_key_init, it will initialize automatically.

- atrf-path/gui.c (raw, main): renamed "raw" to get_key_init
- atrf-path/gui.c (old_term, restore_term, get_key_init, get_key):
  moved to include/getkey.h and lib/getkey.c
- lib/getkey.c (get_key_init, get_key): made calling get_key_init
  optional
- lib/Makefile (OBJS): added getkey.o
2011-07-04 20:29:22 -03:00
Werner Almesberger
6d1198cccd xxx 2011-07-04 20:29:22 -03:00
Werner Almesberger
71f095d8de tools/Makefile (BEN_DIRS): add dirtpan iff its lowpan tools dependency is met 2011-07-04 20:29:22 -03:00
Werner Almesberger
ae348fb5cc switch linux-zigbee tools source from (old) tarball to git repository
- install/INSTALL-PC: updated build process of lowpan-tools to
  use the git repository
- tools/dirtpan/Makefile (CFLAGS): added include path for lowpan
  tools from git
2011-07-04 20:29:22 -03:00
Werner Almesberger
848e5af33a Merge branch 'master' of projects.qi-hardware.com:ben-wpan 2011-07-04 14:46:55 -03:00
Werner Almesberger
0c77658006 install/ben-wpan-config-2.6.38: enabled CONFIG_PROC_PAGE_MONITOR
ubb-vga and possibly mplayer need /proc/self/pagemap
2011-07-04 14:31:50 -03:00
Werner Almesberger
c705bf0939 xxx 2011-07-01 12:55:28 -03:00
Werner Almesberger
e3066d7a21 tools/Makefile (BEN_DIRS): add dirtpan iff its lowpan tools dependency is met 2011-07-01 12:52:04 -03:00
Werner Almesberger
2d961523f2 switch linux-zigbee tools source from (old) tarball to git repository
- install/INSTALL-PC: updated build process of lowpan-tools to
  use the git repository
- tools/dirtpan/Makefile (CFLAGS): added include path for lowpan
  tools from git
2011-07-01 12:18:34 -03:00
Werner Almesberger
d94ac9587d TODO: various updates 2011-06-30 16:02:08 -03:00
Werner Almesberger
673d29a29a tools/Makefile (BEN_DIRS): comment out dirtpan again, to avoid hdr dependency 2011-06-30 15:56:54 -03:00
Werner Almesberger
b3b037e18d TODO: update for switch to spi_atben 2011-06-26 07:24:18 -03:00
Werner Almesberger
0eff1587b5 install/ben-wpan-config-2.6.38: updated for spi_atben driver 2011-06-26 07:21:52 -03:00
Werner Almesberger
865d3bb264 TODO: updated 2011-06-26 07:13:22 -03:00
Werner Almesberger
8f949842db atusb/fw/: remove unused items when building the USB driver for the boot loader
- usb/atu2.c (NUM_EPS), board.h (NUM_EPS): moved definition to
  board.h
- board.h (NUM_EPS): use one EP for the boot loader, two for the
  application
- usb/atu2.c (ep_init): initialize EP 1 only in an application build
2011-06-26 06:59:13 -03:00
Werner Almesberger
6909fc232a atusb/fw/Makefile: introduce target-specific compliation variants
- Makefile (USB_OBJS): moved into OBJS and BOOT_OBJS
- Makefile (OBJS): atu2.o is now app-atu2.o
- Makefile (BOOT_OBJS): atu2.o is now boot-atu2.o
- Makefile (MKDEP, %.o): moved dependency generation to macro $(MKDEP)
- Makefile (app-%.o): build from usb/%.c
- Makefile (boot -%.o): build from usb/%.c and set -DBOOT_LOADER
2011-06-26 06:56:01 -03:00
Werner Almesberger
0194dc1a05 tools/dirtpan/: added statistics collection, SIGUSR1 to dump, SIGUSR2 to reset
- dirtpan.c (stats, send_frame, send_more, send_ack, rx_pck, tx_pck,
  ack_timeout, reass_timeout): gather extensive statistics
- dirtpan.c (handle_usr1, main): if running in the foreground, dump
  statistics on standard error on SIGUSR1
- dirtpan.c (handle_usr2, main): if running in the foreground, reset
  statistics to zero on SIGUSR2
2011-06-26 00:03:56 -03:00
Werner Almesberger
417d12ce05 tools/Makefile (BEN_DIRS): added "dirtpan", so it's now included by default 2011-06-26 00:03:07 -03:00
Werner Almesberger
5392401c0a tools/atrf-rssi/: added menu for regulation area selection
- gui.c (area_off, gui): don't show a regulation area by default
- letter.h, letter.c: drawing of limited character set
- Makefile (OBJS_host, OBJS_ben_jlime): added letter.o
- gui.c (print, area_selector, gui): show regulation area selector
2011-06-24 22:29:17 -03:00
Werner Almesberger
9af0f937de tools/atrf-rssi/: added WLAN channel display (US, EU, and JP)
- gui.c (wlan_area): the currently displayed regulation domain
- gui.c (wlan_channels): return the number of WLAN channels
- gui.c (show_wlan_channel): determine whether the specified channel
  should be used in the currently displayed regulation domain
- gui.c (label_wlan_channels): show WLAN channel numbers and their
  width
- gui.c (gui): switch regulation domain with E (Europe), J (Japan),
  and U (US)
- gui.c (gui): quit now only if Q is pressed instead of any key
- gui.c (gui): call label_wlan_channels to display the WLAN channels
2011-06-24 21:50:28 -03:00
Werner Almesberger
7c12bf02c1 tools/atrf-xmit/atrf-xmit.c: cleaned up timeouts and interrupt polling
- atrf-xmit.c (xfer_one): wait 10 ms for the packet to be sent (1 ms
  was clearly too short)
- atrf-xmit.c (xfer_one): use wait_for_interrupt instead of
  atrf_interrupt_wait, so that the retry logic can do its work
2011-06-23 13:21:25 -03:00