Skip to content

Commit be8b9cc

Browse files
committedSep 30, 2009
Added a DEBUG mode and general code cleanups
1 parent 81093d2 commit be8b9cc

File tree

1 file changed

+87
-164
lines changed

1 file changed

+87
-164
lines changed
 

‎WeatherStationReceiver.pde

+87-164
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Receives and decodes a pulse-width and transition encoded RF
55
* bitstream, received through a 433MHz receiver module into the PB0
6-
* ICP Input Capture pin.
6+
* Input Capture Pin (ICP).
77
*
88
* The transmitter is from the La Crosse WS-2355 Weather Station
99
* package, the RF transmitter is the integrated thermo/hygro station,
@@ -15,7 +15,7 @@
1515
*
1616
* Copyright 2009 Marc Alexander <marc.alexander@gmail.com>
1717
* Copyright 2009 Jonathan Oxer <jon@oxer.com.au>
18-
* http://www.practicalarduino.com/projects/medium/weather-station-receiver
18+
* http://www.practicalarduino.com/projects/weather-station-receiver
1919
*/
2020

2121
/**
@@ -83,25 +83,23 @@ const char strWindDirection[16][4] =
8383
"W ", "WNW", "NW ", "NNW"
8484
};
8585

86+
// Comment out for a normal build
87+
// Uncomment for a debug build
88+
//#define DEBUG
8689

8790
/**
8891
* Initial configuration
8992
*/
9093
void setup(void)
9194
{
92-
Init_Ports();
93-
94-
//Note: This uses PORTB0 for the Input capture input, sets up and uses Timer/Counter1 registers,
95-
// and also uses PORTD6 and PORTD7 for test LEDs in testing
96-
Init_RF_Interpreters();
97-
9895
Serial.begin( 38400 ); //using the serial port at 38400bps for debugging and logging
9996
Serial.println( "Weather Station Receiver has powered up" );
100-
101-
interrupts(); // Enable interrupts
97+
98+
Init_Ports();
99+
Init_RF_Interpreters();
100+
interrupts(); // Enable interrupts (NOTE: is this necessary? Should be enabled by default)
102101
}
103102

104-
105103
/**
106104
* Main program loop
107105
*/
@@ -110,7 +108,6 @@ void loop(void)
110108
Packet_Converter_WS2355();
111109
}
112110

113-
114111
/**
115112
* Initialise port initial state and data direction registers
116113
*/
@@ -119,7 +116,6 @@ void Init_Ports()
119116
DDRB = 0x2F; // B00101111
120117
}
121118

122-
123119
/*--------------------------------------------------------------------------------------
124120
Packet_Converter_WS2355
125121
Inspect, validate and convert any fresh incoming packet data to the latest real world values
@@ -153,7 +149,7 @@ void Init_Ports()
153149
8 = S 9 = SSW 10 = SW 11 = WSW
154150
12 = W 13 = WNW 14 = NW 15 = NNW
155151
156-
iiiiiiii = station ID byte. May not be using the top(lefT) bit of this byte, but is using bits 0-6 at least.
152+
iiiiiiii = station ID byte. May not be using the top(left) bit of this byte, but is using bits 0-6 at least.
157153
Every time the WS-2300-25S transmitter batteries are changed, it generates a new semi-random
158154
station ID. The user is expected to power cycle the WS-2355 receiver which will then
159155
'lock on' to the next received station ID.
@@ -174,87 +170,78 @@ void Packet_Converter_WS2355(void)
174170

175171
if( bICP_WSR_PacketInputPointer != bICP_WSR_PacketOutputPointer )
176172
{
177-
//----------------------------------------------------------------------------
178-
//a fresh packet is ready to check and convert
179-
//Serial.print( CHAR_CR, BYTE );
180-
//Serial.print( CHAR_LF, BYTE );
173+
// A fresh packet is ready to check and convert
174+
#ifdef DEBUG
181175
if( (ulICP_Timestamp_262_144mS - ulWSR_LastTimestamp_262_144mS) > 8 )
182176
{
183-
//extra CR/LF if there has been more than about 2 seconds since the last packet
184-
//Serial.print( CHAR_CR, BYTE );
185-
//Serial.print( CHAR_LF, BYTE );
177+
// Blank separator line if there has been more than about 2 seconds since the last
178+
// packet to make it easier to see what belongs with what
179+
Serial.println();
186180
}
181+
#endif
182+
183+
#ifdef DEBUG
187184
//print it in binary text out the serial port
188-
/* for( b = WSR_TIMESTAMP_BIT_OFFSET ; b < (WSR_RFPACKETBITSIZE+WSR_TIMESTAMP_BIT_OFFSET) ; b++ )
189-
//for( b = 0 ; b < (WSR_RFPACKETBITSIZE+WSR_TIMESTAMP_BIT_OFFSET) ; b++ )
185+
Serial.print("BINARY=");
186+
for( b = WSR_TIMESTAMP_BIT_OFFSET ; b < (WSR_RFPACKETBITSIZE+WSR_TIMESTAMP_BIT_OFFSET) ; b++ )
190187
{
191188
if( (bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][b >> 3] & (0x80 >> (b&0x07))) != 0 )
192189
{
193190
Serial.print( '1', BYTE );
194-
}
195-
else
196-
{
191+
} else {
197192
Serial.print( '0', BYTE );
198193
}
199194
if( b == 31 )
200195
Serial.print( ' ', BYTE ); //timestamp seperator
201-
} */
196+
}
197+
Serial.println();
198+
202199
//print it in hex text out the serial port
203200
//Serial.print( ' ', BYTE );
204-
/*
201+
Serial.print("HEX=");
205202
for( b = 0 ; b < ((WSR_RFPACKETBITSIZE+WSR_TIMESTAMP_BIT_OFFSET)/4) ; b += 2 )
206203
{
207-
//one nibble at a time
204+
// One nibble at a time
208205
c = bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][b >> 1];
209-
//top nibble
210-
Serial.print( (c & 0xF0) >> 4, HEX ); //Serial.print( "0123456789ABCDEF"[(c & 0xF0) >> 4] );
211-
//bottom nibble, drop the last one since it's not part of the 52 incoming bits
206+
// Top nibble
207+
Serial.print( (c & 0xF0) >> 4, HEX );
208+
// Bottom nibble, drop the last one since it's not part of the 52 incoming bits
212209
if( b < (((WSR_RFPACKETBITSIZE+WSR_TIMESTAMP_BIT_OFFSET)/4)-1) )
213-
Serial.print( (c & 0x0F), HEX ); //Serial.print( "0123456789ABCDEF"[(c & 0x0F)] );
214-
//timestamp seperator
210+
Serial.print( (c & 0x0F), HEX );
211+
// Timestamp seperator
215212
if( b == 6 )
216213
Serial.print( ' ', BYTE );
217214
}
218-
*/
215+
Serial.println();
216+
#endif
217+
219218
//----------------------------------------------------------------------------
220219
if( PacketAndChecksum_OK_WS2355 )
221220
{
222-
//fish out the station ID
221+
// Extract the station ID
223222
b = (bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][5] << 4);
224223
b += (bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][6] >> 4);
225224
bWSR_StationTransmitterID = b;
226-
//test print to serial port with decimal place management
227-
//Serial.print( " st:" );
228-
//Serial.print( bWSR_StationTransmitterID, DEC );
229-
230-
//Serial.print( " ok:" );
225+
// Print to serial port
226+
Serial.print( "STATIONID=" );
227+
Serial.println( bWSR_StationTransmitterID, DEC );
231228

232-
//bits 4 and 5 of this byte are the sensor/packet ID
229+
// Bits 4 and 5 of this byte are the sensor/packet ID
233230
b = bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][5];
234231
b = (b >> 4) & 0x03;
235232
switch( b )
236233
{
237234
case 0:
238235
{
239-
//----------------
240-
//0: temperature
241-
//sensor/packet ID bits are 0x00, temperature is present in this packet
242-
//lower nibble of byte 7 is first temperature digit, take care of 3xx offset
236+
// 0: temperature
237+
// Sensor/packet ID bits are 0x00, temperature is present in this packet
238+
// Lower nibble of byte 7 is first temperature digit, take care of 3xx offset
243239
si = ((bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][7] & 0x0F) * 100);
244240
si += ((bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][8] >> 4) * 10);
245241
si += (bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][8] & 0x0F);
246242
siWSR_CurrentTemperature = (si - 300);
247243

248-
//test print to serial port with decimal place management
249-
/* Serial.print( ' ', BYTE );
250-
Serial.print( (siWSR_CurrentTemperature/10), DEC );
251-
Serial.print( '.', BYTE );
252-
if( siWSR_CurrentTemperature < 0 )
253-
Serial.print( ((0-siWSR_CurrentTemperature)%10), DEC );
254-
else
255-
Serial.print( (siWSR_CurrentTemperature%10), DEC );
256-
Serial.print( '?', BYTE ); */
257-
244+
// Print to serial port with decimal place management
258245
Serial.print("TEMPERATURE=");
259246
Serial.print( (siWSR_CurrentTemperature/10), DEC );
260247
Serial.print( '.', BYTE );
@@ -263,49 +250,32 @@ void Packet_Converter_WS2355(void)
263250
} else {
264251
Serial.println( (siWSR_CurrentTemperature%10), DEC );
265252
}
266-
267253
break;
268254
}
269255
case 1:
270256
{
271-
//----------------
272-
//1: humidity
257+
// 1: humidity
273258
//sensor/packet ID bits are 0x01, humidity is present in this packet
274259
c = ((bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][7] & 0x0F) * 10);
275260
c += (bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][8] >> 4);
276261
bWSR_CurrentHumidity = c;
277262

278-
//test print to serial port with decimal place management
279-
/*Serial.print( ' ', BYTE );
280-
Serial.print( bWSR_CurrentHumidity, DEC );
281-
Serial.println( "% RH" ); */
282-
283-
// Simplified output format
263+
// Print to serial port with decimal place management
284264
Serial.print("HUMIDITY=");
285265
Serial.println( bWSR_CurrentHumidity, DEC );
286266
break;
287267
}
288268
case 2:
289269
{
290-
//----------------
291-
//2: rainfall
270+
// 2: rainfall
292271
si = (sint)(bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][7] & 0x0F) << 8;
293272
si += bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][8];
294273
uiWSR_RainfallCount = (uint)si;
295274

296275
//killer (for the Arduino) long multiply here, put in for now to demo real mm of rainfall maths
297276
ulWSR_Rainfall_mm_x10 = (((unsigned long)uiWSR_RainfallCount * 518) / 100);
298277

299-
//test print to serial port
300-
/* Serial.print( ' ', BYTE );
301-
Serial.print( uiWSR_RainfallCount, DEC );
302-
Serial.print( " rainfall, " );
303-
Serial.print( (ulWSR_Rainfall_mm_x10/10), DEC );
304-
Serial.print( '.', BYTE );
305-
Serial.print( (ulWSR_Rainfall_mm_x10%10), DEC );
306-
Serial.println( " mm" ); */
307-
308-
// Simplified output format:
278+
// Print to serial port
309279
Serial.print("RAINFALL=");
310280
Serial.print( (ulWSR_Rainfall_mm_x10/10), DEC );
311281
Serial.print( '.', BYTE );
@@ -314,10 +284,9 @@ void Packet_Converter_WS2355(void)
314284
}
315285
case 3:
316286
{
317-
//----------------
318-
//3: wind direction and speed
319-
//sensor/packet ID bits are 0x03, wind data is present in this packet
320-
//wind direction
287+
// 3: wind direction and speed
288+
// Sensor/packet ID bits are 0x03, wind data is present in this packet
289+
// Wind direction
321290
bWSR_CurrentWindDirection = (bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][8] & 0x0F);
322291

323292
//wind speed, decimal value is metres per second * 10 (1 fixed deciml place)
@@ -326,55 +295,22 @@ void Packet_Converter_WS2355(void)
326295
si += (bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][8] >> 4);
327296
uiWSR_CurrentWindSpeed_m_per_sec = (uint)si;
328297

329-
//test print to serial port with decimal place management
330-
/* Serial.print( ' ', BYTE );
331-
Serial.print( strWindDirection[bWSR_CurrentWindDirection] );
332-
Serial.print( " (" );
333-
Serial.print( bWSR_CurrentWindDirection, DEC );
334-
Serial.print( ") wind, speed" ); */
335-
336-
// Simplified output format
298+
// Print to serial port with decimal place management
337299
Serial.print("WINDDIRECTION=");
338300
Serial.println( strWindDirection[bWSR_CurrentWindDirection] );
339301

340-
/* Serial.print( ' ', BYTE );
341-
Serial.print( (uiWSR_CurrentWindSpeed_m_per_sec/10), DEC );
342-
Serial.print( '.', BYTE );
343-
Serial.print( (uiWSR_CurrentWindSpeed_m_per_sec%10), DEC );
344-
Serial.print( "m/s" );
345-
*/
346302
Serial.print("WINDSPEED=");
347303
Serial.print( (uiWSR_CurrentWindSpeed_m_per_sec/10), DEC );
348304
Serial.print( '.', BYTE );
349305
Serial.println( (uiWSR_CurrentWindSpeed_m_per_sec%10), DEC );
350-
351-
//convert wind speed m/s to kmh and display also 100 raw = 10.0m/s, * 3.6 = km/h
352-
//si = uiWSR_CurrentWindSpeed_m_per_sec * 36 / 10;
353-
/*Serial.print( ' ', BYTE );
354-
Serial.print( (si/10), DEC );
355-
Serial.print( '.', BYTE );
356-
Serial.print( (si%10), DEC );
357-
Serial.print( "km/h" );
358-
Serial.print( ', Raw: ', BYTE ); */
359-
360-
// Simplified output format
361-
/*Serial.print("WINDSPEED=");
362-
Serial.print( (si/10), DEC );
363-
Serial.print( '.', BYTE );
364-
Serial.println( (si%10), DEC ); */
365-
366306
break;
367307
}
368308
default:
369309
{
370310
break;
371311
}
372312
}
373-
//----------------
374-
375-
}
376-
else
377-
{
313+
} else {
378314
Serial.print( " bad checksum or packet header" );
379315
}
380316

@@ -397,23 +333,23 @@ byte PacketAndChecksum_OK_WS2355(void)
397333
byte b;
398334
byte c;
399335

400-
//first check, last 4 bits of packet are sum of the previous 48 bits (12 nibbles)
401-
//don't forget to offset past the timestamp in the first 4 bytes
336+
// First check, last 4 bits of packet are sum of the previous 48 bits (12 nibbles)
337+
// Don't forget to offset past the timestamp in the first 4 bytes
402338
c = 0;
403339
for( b = 4 ; b < 10 ; b++ )
404340
{
405-
//checked a byte at a time, accumulate into c
341+
// Checked a byte at a time, accumulate into c
406342
c += (bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][b] >> 4);
407343
c += (bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][b] & 0x0F);
408344
}
409345
c &= 0x0F;
410346
if( c != (bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][10] >> 4) )
411347
{
412-
return( false ); //checksum does not match
348+
return( false ); // Checksum does not match
413349
}
414350

415-
//second check, first byte of packet must be 0x09 ( B00001001 ), appears to be
416-
//the main identifier for this station
351+
// Second check, first byte of packet must be 0x09 ( B00001001 ), appears to be
352+
// the main identifier for this station
417353
if( bICP_WSR_PacketData[bICP_WSR_PacketOutputPointer][4] != 0x09 )
418354
{
419355
return( false );
@@ -442,10 +378,10 @@ void Init_RF_Interpreters(void)
442378
DDRD |= B11000000; //(1<<PORTD6); //DDRD |= (1<<PORTD7); (example of B prefix)
443379
GREEN_TESTLED_OFF(); //GREEN test led off
444380
RED_TESTLED_ON(); //RED test led on
445-
//PORTD |= _BV(PORTD6); //GREEN led off (example of _BV macro)
446-
//PORTD &= ~_BV(PORTD7); //RED led on (example of _BV macro)
447-
//PORTD |= (1<<PORTD6); //GREEN led off (example of AVR studio style)
448-
//PORTD &= ~(1<<PORTD7); //RED led on (example of AVR studio style)
381+
//PORTD |= _BV(PORTD6); //GREEN test led off (example of _BV macro)
382+
//PORTD &= ~_BV(PORTD7); //RED test led on (example of _BV macro)
383+
//PORTD |= (1<<PORTD6); //GREEN test led off (example of AVR studio style)
384+
//PORTD &= ~(1<<PORTD7); //RED test led on (example of AVR studio style)
449385

450386
//---------------------------------------------------------------------------------------------
451387
//ICNC1: Input Capture Noise Canceler On, 4 successive equal ICP1 samples required for trigger (4*4uS = 16uS delayed)
@@ -480,10 +416,11 @@ ISR( TIMER1_OVF_vect )
480416
--------------------------------------------------------------------------------------*/
481417
ISR( TIMER1_CAPT_vect )
482418
{
483-
//immediately grab the current capture time in case it triggers again and overwrites ICR1 with an unexpected new value
419+
// Immediately grab the current capture time in case it triggers again and
420+
// overwrites ICR1 with an unexpected new value
484421
uiICP_CapturedTime = ICR1;
485422

486-
//GREEN test led on (flicker for debug)
423+
// GREEN test led on (flicker for debug)
487424
GREEN_TESTLED_ON();
488425

489426
//----------------------------------------------------------------------------
@@ -493,9 +430,7 @@ GREEN_TESTLED_ON();
493430
{
494431
SET_INPUT_CAPTURE_FALLING_EDGE(); //previous period was low and just transitioned high
495432
bICP_CapturedPeriodWasHigh = false; //uiICP_CapturedPeriod about to be stored will be a low period
496-
}
497-
else
498-
{
433+
} else {
499434
SET_INPUT_CAPTURE_RISING_EDGE(); //previous period was high and transitioned low
500435
bICP_CapturedPeriodWasHigh = true; //uiICP_CapturedPeriod about to be stored will be a high period
501436
}
@@ -556,14 +491,10 @@ void RF_Interpreter_WS2355( /*uiICP_CapturedPeriod, bICP_CapturedPeriodWasHigh*/
556491
{
557492
//short high, valid one bit
558493
bValidBit = WSR_BIT_ONE;
559-
}
560-
else if( (uiICP_CapturedPeriod >= WSR_LONG_PERIOD_MIN) && (uiICP_CapturedPeriod <= WSR_LONG_PERIOD_MAX) )
561-
{
494+
} else if( (uiICP_CapturedPeriod >= WSR_LONG_PERIOD_MIN) && (uiICP_CapturedPeriod <= WSR_LONG_PERIOD_MAX) ) {
562495
//long high, valid zero bit
563496
bValidBit = WSR_BIT_ZERO;
564-
}
565-
else
566-
{
497+
} else {
567498
//invalid high period, in the dead zone between short and long bit period lengths
568499
WSR_RESET();
569500
}
@@ -588,77 +519,69 @@ void RF_Interpreter_WS2355( /*uiICP_CapturedPeriod, bICP_CapturedPeriodWasHigh*/
588519
&= ~(0x01 << (bICP_WSR_PacketInputBitPointer&0x07));
589520
bICP_WSR_PacketInputBitPointer++;
590521
bICP_WSR_State = WSR_STATE_LOADING_BITSTREAM;
591-
}
592-
else
593-
{
522+
} else {
594523
WSR_RESET();
595524
}
596525
break;
597526
}
598527
case WSR_STATE_LOADING_BITSTREAM:
599528
{
600-
//----------
601-
//potentially valid packet bitstream is on its way in, keep loading it up
529+
// Potentially valid packet bitstream is on its way in, keep loading it up
602530
if( bValidBit == WSR_BIT_ZERO )
603531
{
604532
bICP_WSR_PacketData[bICP_WSR_PacketInputPointer][bICP_WSR_PacketInputBitPointer >> 3]
605533
&= ~(0x80 >> (bICP_WSR_PacketInputBitPointer&0x07));
606-
}
607-
else
608-
{
534+
} else {
609535
bICP_WSR_PacketData[bICP_WSR_PacketInputPointer][bICP_WSR_PacketInputBitPointer >> 3]
610536
|= (0x80 >> (bICP_WSR_PacketInputBitPointer&0x07));
611537
}
612-
//----------
613-
//check at appropriate location of the incoming bitstream, if it is valid and throw away if not
538+
539+
// Check at appropriate location of the incoming bitstream, if it is valid and throw away if not
614540
if( bICP_WSR_PacketInputBitPointer == (WSR_TIMESTAMP_BIT_OFFSET + 4) )
615541
{
616-
// 01234 01234
617-
//acceptable start to packet is 00001 or 00010 (lost the first 0), could optimise this but will leave with b for now for stability and debugging
542+
// 01234 01234
543+
// Acceptable start to packet is 00001 or 00010 (lost the first 0), could optimise
544+
// this but will leave with b for now for stability and debugging
618545
b = bICP_WSR_PacketData[bICP_WSR_PacketInputPointer][4/*bICP_WSR_PacketInputBitPointer >> 3*/];
619546
b &= B11111000;
620547
if( b == B00010000 )
621548
{
622549
//valid packet 00010 start (with lost first zero), realign and continue
623550
bICP_WSR_PacketData[bICP_WSR_PacketInputPointer][4/*bICP_WSR_PacketInputBitPointer >> 3*/] = B00001000;
624551
bICP_WSR_PacketInputBitPointer++; //move up one past the inserted missing bit
625-
}
626-
else if( b != B00001000 )
627-
{
552+
} else if( b != B00001000 ) {
628553
//invalid packet start, not 00001, reset
629554
WSR_RESET();
630555
}
631556
}
632-
//----------
633-
//final check, has the last packet bit (52 bits total) come in, if so, mark this packet as done and move the major packet input pointer along
557+
558+
// Final check, has the last packet bit (52 bits total) come in? If so, mark this packet
559+
// as done and move the major packet input pointer along
634560
if( bICP_WSR_PacketInputBitPointer == (WSR_TIMESTAMP_BIT_OFFSET + (WSR_RFPACKETBITSIZE-1)) )
635561
{
636-
//got full packet, timestamp it for the main loop
562+
// Got full packet, timestamp it for the main loop
637563
bICP_WSR_PacketData[bICP_WSR_PacketInputPointer][0] = byte(ulICP_Timestamp_262_144mS >> 24);
638564
bICP_WSR_PacketData[bICP_WSR_PacketInputPointer][1] = byte(ulICP_Timestamp_262_144mS >> 16);
639565
bICP_WSR_PacketData[bICP_WSR_PacketInputPointer][2] = byte(ulICP_Timestamp_262_144mS >> 8);
640566
bICP_WSR_PacketData[bICP_WSR_PacketInputPointer][3] = byte(ulICP_Timestamp_262_144mS);
641-
//pointer and packet count
567+
// Pointer and packet count
642568
bICP_WSR_PacketInputPointer = ((bICP_WSR_PacketInputPointer+1)&(WSR_PACKETARRAYSIZE-1));//only the lower three bits are used for the 8 entry array
643569
uiICP_WSR_ReceivedPacketCount++; //note will overflow and wrap, used for display of progress only
644570
WSR_RESET();
645571
}
646-
//----------
647-
//increment pointer to next new bit location
572+
573+
// Increment pointer to next new bit location
648574
bICP_WSR_PacketInputBitPointer++;
649575
break;
650576
}
651577
}
652578
}
653579
//----------------------------------------------------------------------------
654-
}
655-
else
656-
{
580+
} else {
657581
//----------------------------------------------------------------------------
658-
//PERIOD OUT OF BOUNDS, DISCARD
659-
//This will throw away any out of range periods and reset the state machine, high or low.
582+
// PERIOD OUT OF BOUNDS, DISCARD
583+
// This will throw away any out of range periods and reset the state machine, high or low.
660584
//----------------------------------------------------------------------------
661585
WSR_RESET();
662586
}
663-
664587
}

0 commit comments

Comments
 (0)
Please sign in to comment.