2010-09-09 23:42:47 +03:00
|
|
|
/*
|
|
|
|
* include/misctxrx.h - Miscellaenous transceiver helper functions
|
|
|
|
*
|
2011-04-12 22:37:05 +03:00
|
|
|
* Written 2010-2011 by Werner Almesberger
|
|
|
|
* Copyright 2010-2011 Werner Almesberger
|
2010-09-09 23:42:47 +03:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MISCTXRX_H
|
|
|
|
#define MISCTXRX_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
The Great ATSPI Renaming, part 4: rename include/atspi.h to include/atrf.h
- include/atspi.h: renamed to include/atrf.h
- include/misctxrx.h, lib/atrf.c, lib/misctxrx.c, atspi-id/atspi-id.c,
atspi-reset/atspi-reset.c, atspi-rssi/atspi-rssi.c, atspi-rssi/gui.c,
atspi-rssi/gui.h, atspi-trim/atspi-trim.c, atspi-txrx/atspi-txrx.c:
change #include "atspi.h" to #include "atrf.h"
2010-11-11 13:58:47 +02:00
|
|
|
#include "atrf.h"
|
2010-09-09 23:42:47 +03:00
|
|
|
|
|
|
|
|
2011-06-20 23:21:40 +03:00
|
|
|
void flush_interrupts(struct atrf_dsc *dsc);
|
2013-07-31 01:59:11 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* timeout_ms:
|
|
|
|
* > 0: time out after that many milliseconds
|
|
|
|
* == 0: wait forever
|
|
|
|
* < 0: wait forever and eliminate poll delays (for high-speed capture)
|
|
|
|
*/
|
|
|
|
|
The Great ATSPI Renaming, part 6: change atrf API from atspi_* to atrf_*
- include/atrf.h, lib/atrf.c (struct atspi_dsc): renamed to "struct
atrf_dsc"
- include/atrf.h, lib/atrf.c (atspi_*): renamed all functions to atrf_*
- include/misctxrx.h, lib/misctxrx.c (wait_for_interrupt): updated for API
name change
- atspi-id/atspi-id.c (show_usb_info, show_info, main),
atspi-reset/atspi-reset.c (main), atspi-rssi/atspi-rssi.c (sweep, main),
atspi-rssi/gui.h (gui), atspi-rssi/gui.c (sweep, gui),
atspi-trim/atspi-trim.c (main), atspi-txrx/atspi-txrx.c (init_txrx,
set_channel, set_power, receive, transmit, test_mode, main):
updated for API name change
2010-11-11 15:10:13 +02:00
|
|
|
uint8_t wait_for_interrupt(struct atrf_dsc *dsc, uint8_t wait_for,
|
tools/: major overhaul of wait_for_interrupt; uses atrf_interrupt_wait now
- include/misctxrx.h (wait_for_interrupt), lib/misctxrx.c
(wait_for_interrupt): replaced sleep_us*timeout limiting mechanism
with a single timeout value in milliseconds
- lib/misctxrx.c (wait_for_interrupt): use atrf_interrupt_wait instead
of polling
- lib/misctxrx.c (wait_for_interrupt): cleaned up control flow
- lib/misctxrx.c (run, die, wait_for_interrupt): renamed variable "run"
to more specific "sigint"
- atrf-txrx/atrf-txrx.c (ping_rx, ping): pass timeout in milliseconds,
not deciseconds
- atrf-rssi/atrf-rssi.c (sweep), atrf-rssi/gui.c (sweep),
atrf-txrx/atrf-txrx.c (init_txrx, receive_message, receive_pcap,
receive, transmit, transmit_pattern, ping_tx, ping_rx),
atrf-xmit/atrf-xmit.c (init_tx, init_rx, xfer_one),
lib/cwtest.c (enter_test_mode_230, start_test_mode_231):
updated use of wait_for_interrupt
2011-06-21 01:58:31 +03:00
|
|
|
uint8_t ignore, int timeout_ms);
|
2010-09-09 23:42:47 +03:00
|
|
|
|
2011-04-13 00:41:03 +03:00
|
|
|
int tx_power_dBm2step(struct atrf_dsc *dsc, double power);
|
|
|
|
double tx_power_step2dBm(struct atrf_dsc *dsc, int step);
|
|
|
|
|
2011-04-12 22:37:05 +03:00
|
|
|
void set_power_step(struct atrf_dsc *dsc, int power, int crc);
|
|
|
|
void set_power_dBm(struct atrf_dsc *dsc, double power, int crc);
|
|
|
|
|
2010-09-09 23:42:47 +03:00
|
|
|
#endif /* !MISCTXRX_H */
|