1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-29 10:59:42 +02:00
ben-wpan/tools/include/misctxrx.h
Werner Almesberger b4a6e8ef46 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-20 20:08:42 -03:00

32 lines
920 B
C

/*
* include/misctxrx.h - Miscellaenous transceiver helper functions
*
* Written 2010-2011 by Werner Almesberger
* Copyright 2010-2011 Werner Almesberger
*
* 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>
#include "atrf.h"
void flush_interrupts(struct atrf_dsc *dsc);
uint8_t wait_for_interrupt(struct atrf_dsc *dsc, uint8_t wait_for,
uint8_t ignore, int timeout_ms);
int tx_power_dBm2step(struct atrf_dsc *dsc, double power);
double tx_power_step2dBm(struct atrf_dsc *dsc, int step);
void set_power_step(struct atrf_dsc *dsc, int power, int crc);
void set_power_dBm(struct atrf_dsc *dsc, double power, int crc);
#endif /* !MISCTXRX_H */