The Internet Power Line Adapter - University of Queensland
The Internet Power Line Adapter - University of Queensland
The Internet Power Line Adapter - University of Queensland
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Home Automation, <strong>Power</strong> <strong>Line</strong>s and the <strong>Internet</strong> Quenten Alick<br />
#define transmitter (EV.b0) /* set when<br />
transmitter device */<br />
#define transmitCompleted (EV.b1)<br />
#define GetCountRecd (EV.b2)<br />
#define TransPktRecd (EV.b3)<br />
#define transmitting (EV.b4)<br />
#define responseTimerRunning (EV.b5)<br />
#define waitingForLoopback (EV.b6)<br />
#define testRunning (EV.b7)<br />
#define LoopbackPktReady (EV2.b0)<br />
uint8 type;<br />
/*<br />
* transmitter device counters<br />
*/<br />
unsigned short int txMax;<br />
unsigned short int txSuccess;<br />
unsigned short int txRcvValid;<br />
uint8 txLength;<br />
uint8 txService;<br />
unsigned short int txCount;<br />
/*<br />
* timer used while waiting for looped back or response<br />
packet from remote device<br />
*/<br />
uint8 response_timer;<br />
/*<br />
* remote device counters<br />
*/<br />
unsigned short int rxCount;<br />
unsigned short int rxValidCount;<br />
uint8 InitializeEval( void )<br />
{<br />
#define MAX_RESTARTS 0x0f<br />
boolean validPacket;<br />
boolean Initialized = FALSE;<br />
/*<br />
* initialize flags and progress LED<br />
*/<br />
LED_1 = OFF;<br />
responseTimerRunning = FALSE;<br />
waitingForLoopback = FALSE;<br />
transmitCompleted = FALSE;<br />
testRunning = FALSE;<br />
LoopbackPktReady = FALSE;<br />
GetCountRecd = FALSE;<br />
TransPktRecd = FALSE;<br />
config.modeByte = DLL | (MAX_RESTARTS