1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-22 13:21:53 +02:00

tools/atrf-txrx/atrf-txrx.c: add section headers and update clkm comment

This commit is contained in:
Werner Almesberger 2013-02-12 16:42:20 -03:00
parent 8ac87a3fa1
commit 8710be5665

View File

@ -74,9 +74,12 @@ enum mode {
static volatile int run = 1;
/* ----- Helper functions -------------------------------------------------- */
/*
* clkm: 0 disable CLKM
* >0 output 2^(clkm-1) MHz signal
* mhz: 0 disable CLKM
* >0 output specified clock
*/
static struct atrf_dsc *init_txrx(const char *driver, int trim, unsigned mhz)
@ -138,6 +141,9 @@ static void set_rate(struct atrf_dsc *dsc, uint8_t rate)
}
/* ----- Message transmit/receive ------------------------------------------ */
static void receive_message(struct atrf_dsc *dsc)
{
uint8_t buf[MAX_PSDU+1]; /* PSDU+LQI */
@ -320,6 +326,9 @@ static void transmit_hmac(struct atrf_dsc *dsc, const char *msg)
}
/* ----- PER test ---------------------------------------------------------- */
static void transmit_pattern(struct atrf_dsc *dsc, double pause_s, int times)
{
uint8_t buf[MAX_PSDU];
@ -355,6 +364,9 @@ static void transmit_pattern(struct atrf_dsc *dsc, double pause_s, int times)
}
/* ----- Ping -------------------------------------------------------------- */
static void ping_tx(struct atrf_dsc *dsc, const struct ping *pck)
{
atrf_reg_write(dsc, REG_TRX_STATE, TRX_CMD_PLL_ON);
@ -440,6 +452,9 @@ static void ping(struct atrf_dsc *dsc, double max_wait_s, int master)
}
/* ----- Continuous wave test ---------------------------------------------- */
static int test_mode(struct atrf_dsc *dsc, uint8_t cont_tx, const char *cmd)
{
int status = 0;
@ -459,6 +474,9 @@ static int test_mode(struct atrf_dsc *dsc, uint8_t cont_tx, const char *cmd)
}
/* ----- Command-line processing ------------------------------------------- */
static void die(int sig)
{
run = 0;