This allows inclusion also in places that don't follow the <project>/dir/
convention. Note that we still need a single directory under which all Qi
project directories are located.
- 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
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
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
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.
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.
- 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