test_phy.c File Reference

Description : Main for physical layer tests. More...

#include <Environment.h>
#include <timedef.h>
#include <serial.h>
#include <string.h>
#include <hal_wait.h>
#include <set_hardware.h>
#include <cc2420.h>
#include <display_info.h>
#include <flash_memory.h>

Include dependency graph for test_phy.c:

Go to the source code of this file.

Data Structures

struct  message
struct  parameters


#define EMITTER
#define NB_TEST_FRAME   50
#define START_INTERVAL   1
#define START_SIZE   6


void init (void)
void main (void)
__interrupt void switch_interrupt (void)

Detailed Description

Description : Main for physical layer tests.

ANGER Thomas
2008 / 12 / 8
There is two program profile (emitter/receiver). You can switch one to another by (un)comment define EMITTER

Emitter behaviour : at wakeup load test parameters from embedded memory an transmit it to receiver. Then, send NB_TEST_FRAME test frame of programed size at regular interval. After that, update test parameters, transmit it and launch another test. Finally, when all test are done, it send a end message to receiver. You can reset test parameters on flash memory by pressing on switch 3.

Receiver behaviour : at wakeup, say "I'm alive" to emitter and wait for test parameters. After that, wait for test frame and end of test messages.

Definition in file test_phy.c.

Define Documentation

#define EMITTER

Definition at line 33 of file test_phy.c.

#define NB_TEST_FRAME   50

Definition at line 29 of file test_phy.c.

Referenced by main().

#define START_INTERVAL   1

Definition at line 31 of file test_phy.c.

Referenced by main().

#define START_SIZE   6

Definition at line 30 of file test_phy.c.

Referenced by main().

Function Documentation

void init ( void   ) 

Definition at line 57 of file test_phy.c.

References cc2420_Init(), clock_init(), halSpiInit(), halWait(), serial_init(), setup_msp430(), setup_ports(), and TIME_CONSTANT.

Here is the call graph for this function:

void main ( void   ) 

__interrupt void switch_interrupt ( void   ) 

Generated on Wed Jun 3 12:06:06 2009 for PowWow v1.0 by  doxygen 1.5.6