24 if sys.hexversion > 0x03000000:
26 if type(r) == type(
""):
27 r = bytearray(r,
'latin-1')
29 if type(s) == type(
""):
30 s = bytearray(s,
'latin-1')
39 def CHECK(t, st, got, expect, pc, desc):
40 if got >= (((1E2-pc)*expect)/1E2)
and got <= (((1E2+pc)*expect)/1E2):
41 print(
"TEST {:2d}.{:<2d} PASS ({}: {:d})".format(t, st, desc, expect))
43 print(
"TEST {:2d}.{:<2d} FAILED got {:d} ({}: {:d})".
44 format(t, st, got, desc, expect))
48 print(
"\nTesting pigpio Python module {}".format(pigpio.VERSION))
50 print(
"Python {}".format(sys.version.replace(
"\n",
" ")))
52 print(
"pigpio version {}.".format(pi.get_pigpio_version()))
54 print(
"Hardware revision {}.".format(pi.get_hardware_revision()))
58 print(
"Mode/PUD/read/write tests.")
60 pi.set_mode(GPIO, pigpio.INPUT)
62 CHECK(1, 1, v, 0, 0,
"set mode, get mode")
64 pi.set_pull_up_down(GPIO, pigpio.PUD_UP)
66 CHECK(1, 2, v, 1, 0,
"set pull up down, read")
68 pi.set_pull_up_down(GPIO, pigpio.PUD_DOWN)
70 CHECK(1, 3, v, 0, 0,
"set pull up down, read")
72 pi.write(GPIO, pigpio.LOW)
74 CHECK(1, 4, v, 1, 0,
"write, get mode")
77 CHECK(1, 5, v, 0, 0,
"read")
79 pi.write(GPIO, pigpio.HIGH)
81 CHECK(1, 6, v, 1, 0,
"write, read")
93 print(
"PWM dutycycle/range/frequency tests.")
95 pi.set_PWM_range(GPIO, 255)
96 pi.set_PWM_frequency(GPIO,0)
97 f = pi.get_PWM_frequency(GPIO)
98 CHECK(2, 1, f, 10, 0,
"set PWM range, set/get PWM frequency")
100 t2cb = pi.callback(GPIO, pigpio.EITHER_EDGE, t2cbf)
102 pi.set_PWM_dutycycle(GPIO, 0)
103 dc = pi.get_PWM_dutycycle(GPIO)
104 CHECK(2, 2, dc, 0, 0,
"get PWM dutycycle")
110 CHECK(2, 3, f, 0, 0,
"set PWM dutycycle, callback")
112 pi.set_PWM_dutycycle(GPIO, 128)
113 dc = pi.get_PWM_dutycycle(GPIO)
114 CHECK(2, 4, dc, 128, 0,
"get PWM dutycycle")
120 CHECK(2, 5, f, 40, 10,
"set PWM dutycycle, callback")
122 pi.set_PWM_frequency(GPIO,100)
123 f = pi.get_PWM_frequency(GPIO)
124 CHECK(2, 6, f, 100, 0,
"set/get PWM frequency")
130 CHECK(2, 7, f, 400, 5,
"callback")
132 pi.set_PWM_frequency(GPIO,1000)
133 f = pi.get_PWM_frequency(GPIO)
134 CHECK(2, 8, f, 1000, 0,
"set/get PWM frequency")
140 CHECK(2, 9, f, 4000, 5,
"callback")
142 r = pi.get_PWM_range(GPIO)
143 CHECK(2, 10, r, 255, 0,
"get PWM range")
145 rr = pi.get_PWM_real_range(GPIO)
146 CHECK(2, 11, rr, 200, 0,
"get PWM real range")
148 pi.set_PWM_range(GPIO, 2000)
149 r = pi.get_PWM_range(GPIO)
150 CHECK(2, 12, r, 2000, 0,
"set/get PWM range")
152 rr = pi.get_PWM_real_range(GPIO)
153 CHECK(2, 13, rr, 200, 0,
"get PWM real range")
155 pi.set_PWM_dutycycle(GPIO, 0)
166 global t3_reset, t3_count, t3_tick, t3_on, t3_off
186 global t3_reset, t3_count, t3_on, t3_off
188 pw=[500.0, 1500.0, 2500.0]
189 dc=[0.2, 0.4, 0.6, 0.8]
191 print(
"PWM/Servo pulse accuracy tests.")
193 t3cb = pi.callback(GPIO, pigpio.EITHER_EDGE, t3cbf)
198 pi.set_servo_pulsewidth(GPIO, x)
199 v = pi.get_servo_pulsewidth(GPIO)
200 CHECK(3, t, v, int(x), 0,
"get servo pulsewidth")
209 CHECK(3, t, int((1E3*(on+off))/on), int(2E7/x), 1,
"set servo pulsewidth")
212 pi.set_servo_pulsewidth(GPIO, 0)
213 pi.set_PWM_frequency(GPIO, 1000)
214 f = pi.get_PWM_frequency(GPIO)
215 CHECK(3, 7, f, 1000, 0,
"set/get PWM frequency")
217 rr = pi.set_PWM_range(GPIO, 100)
218 CHECK(3, 8, rr, 200, 0,
"set PWM range")
223 pi.set_PWM_dutycycle(GPIO, x*100)
224 v = pi.get_PWM_dutycycle(GPIO)
225 CHECK(3, t, v, int(x*100), 0,
"get PWM dutycycle")
234 CHECK(3, t, int((1E3*on)/(on+off)), int(1E3*x), 1,
"set PWM dutycycle")
236 pi.set_PWM_dutycycle(GPIO, 0)
242 print(
"Pipe notification tests.")
244 pi.set_PWM_frequency(GPIO, 0)
245 pi.set_PWM_dutycycle(GPIO, 0)
246 pi.set_PWM_range(GPIO, 100)
249 e = pi.notify_begin(h, (1<<GPIO))
250 CHECK(4, 1, e, 0, 0,
"notify open/begin")
255 f = open(
"/dev/pigpio"+ str(h),
"rb")
259 pi.set_PWM_dutycycle(GPIO, 50)
261 pi.set_PWM_dutycycle(GPIO, 0)
263 e = pi.notify_pause(h)
264 CHECK(4, 2, e, 0, 0,
"notify pause")
266 e = pi.notify_close(h)
267 CHECK(4, 3, e, 0, 0,
"notify close")
283 S, fl, t, v = struct.unpack(
'HHII', chunk)
306 CHECK(4, 4, seq_ok, 1, 0,
"sequence numbers ok")
307 CHECK(4, 5, toggle_ok, 1, 0,
"gpio toggled ok")
308 CHECK(4, 6, n, 80, 10,
"number of notifications")
312 CHECK(4, 4, 0, 0, 0,
"NOT APPLICABLE")
313 CHECK(4, 5, 0, 0, 0,
"NOT APPLICABLE")
314 CHECK(4, 6, 0, 0, 0,
"NOT APPLICABLE")
328 Now is the winter of our discontent 329 Made glorious summer by this sun of York; 330 And all the clouds that lour'd upon our house 331 In the deep bosom of the ocean buried. 332 Now are our brows bound with victorious wreaths; 333 Our bruised arms hung up for monuments; 334 Our stern alarums changed to merry meetings, 335 Our dreadful marches to delightful measures. 336 Grim-visaged war hath smooth'd his wrinkled front; 337 And now, instead of mounting barded steeds 338 To fright the souls of fearful adversaries, 339 He capers nimbly in a lady's chamber 340 To the lascivious pleasing of a lute. 343 print(
"Waveforms & bit bang serial read/write tests.")
345 t5cb = pi.callback(GPIO, pigpio.FALLING_EDGE, t5cbf)
347 pi.set_mode(GPIO, pigpio.OUTPUT)
350 CHECK(5, 1, e, 0, 0,
"callback, set mode, wave clear")
359 e = pi.wave_add_generic(wf)
360 CHECK(5, 2, e, 4, 0,
"pulse, wave add generic")
362 wid = pi.wave_create()
363 e = pi.wave_send_repeat(wid)
365 CHECK(5, 3, e, 9, 0,
"wave send repeat")
367 CHECK(5, 3, e, 19, 0,
"wave send repeat")
372 CHECK(5, 4, c, 50, 1,
"callback")
374 e = pi.wave_tx_stop()
375 CHECK(5, 5, e, 0, 0,
"wave tx stop")
377 e = pi.bb_serial_read_open(GPIO, BAUD)
378 CHECK(5, 6, e, 0, 0,
"serial read open")
381 e = pi.wave_add_serial(GPIO, BAUD, TEXT, 5000000)
382 CHECK(5, 7, e, 3405, 0,
"wave clear, wave add serial")
384 wid = pi.wave_create()
385 e = pi.wave_send_once(wid)
387 CHECK(5, 8, e, 6811, 0,
"wave send once")
389 CHECK(5, 8, e, 7116, 0,
"wave send once")
394 CHECK(5, 9, c, 0, 0,
"callback")
397 while pi.wave_tx_busy():
401 CHECK(5, 10, c, 1702, 0,
"wave tx busy, callback")
403 c, text = pi.bb_serial_read(GPIO)
404 CHECK(5, 11,
STRCMP(text, TEXT),
True, 0,
"wave tx busy, serial read");
406 e = pi.bb_serial_read_close(GPIO)
407 CHECK(5, 12, e, 0, 0,
"serial read close")
409 c = pi.wave_get_micros()
410 CHECK(5, 13, c, 6158148, 0,
"wave get micros")
412 CHECK(5, 14, 0, 0, 0,
"NOT APPLICABLE")
414 c = pi.wave_get_max_micros()
415 CHECK(5, 15, c, 1800000000, 0,
"wave get max micros")
417 c = pi.wave_get_pulses()
418 CHECK(5, 16, c, 3405, 0,
"wave get pulses")
420 CHECK(5, 17, 0, 0, 0,
"NOT APPLICABLE")
422 c = pi.wave_get_max_pulses()
423 CHECK(5, 18, c, 12000, 0,
"wave get max pulses")
425 c = pi.wave_get_cbs()
427 CHECK(5, 19, c, 6810, 0,
"wave get cbs")
429 CHECK(5, 19, c, 7115, 0,
"wave get cbs")
431 CHECK(5, 20, 0, 0, 0,
"NOT APPLICABLE")
433 c = pi.wave_get_max_cbs()
434 CHECK(5, 21, c, 25016, 0,
"wave get max cbs")
437 CHECK(5, 22, e, 0, 0,
"wave clear")
439 e = pi.wave_add_generic(wf)
440 CHECK(5, 23, e, 4, 0,
"pulse, wave add generic")
442 w1 = pi.wave_create()
443 CHECK(5, 24, w1, 0, 0,
"wave create")
445 e = pi.wave_send_repeat(w1)
447 CHECK(5, 25, e, 9, 0,
"wave send repeat")
449 CHECK(5, 25, e, 19, 0,
"wave send repeat")
454 CHECK(5, 26, c, 50, 1,
"callback")
456 e = pi.wave_tx_stop()
457 CHECK(5, 27, e, 0, 0,
"wave tx stop")
459 e = pi.wave_add_serial(GPIO, BAUD, TEXT, 5000000)
460 CHECK(5, 28, e, 3405, 0,
"wave add serial")
462 w2 = pi.wave_create()
463 CHECK(5, 29, w2, 1, 0,
"wave create")
465 e = pi.wave_send_once(w2)
467 CHECK(5, 30, e, 6811, 0,
"wave send once")
469 CHECK(5, 30, e, 7116, 0,
"wave send once")
474 CHECK(5, 31, c, 0, 0,
"callback")
477 while pi.wave_tx_busy():
481 CHECK(5, 32, c, 1702, 0,
"wave tx busy, callback")
483 e = pi.wave_delete(0)
484 CHECK(5, 33, e, 0, 0,
"wave delete")
493 global t6_count, t6_on, t6_on_tick
498 if t6_on_tick
is not None:
502 global t6_count, t6_on
504 print(
"Trigger tests.")
506 pi.write(GPIO, pigpio.LOW)
510 t6cb = pi.callback(GPIO, pigpio.EITHER_EDGE, t6cbf)
516 pi.gpio_trigger(GPIO, p, 1)
520 CHECK(6, 1, t6_count, 5, 0,
"gpio trigger count")
522 CHECK(6, 2, t6_on, tp, 25,
"gpio trigger pulse length")
530 if level == pigpio.TIMEOUT:
536 print(
"Watchdog tests.")
539 t7cb = pi.callback(GPIO, pigpio.FALLING_EDGE, t7cbf)
541 pi.set_watchdog(GPIO, 50)
546 CHECK(7, 1, c, 39, 5,
"set watchdog on count")
548 pi.set_watchdog(GPIO, 0)
553 CHECK(7, 2, c, 0, 1,
"set watchdog off count")
558 print(
"Bank read/write tests.")
561 v = pi.read_bank_1() & (1<<GPIO)
562 CHECK(8, 1, v, 0, 0,
"read bank 1")
565 v = pi.read_bank_1() & (1<<GPIO)
566 CHECK(8, 2, v, (1<<GPIO), 0,
"read bank 1")
568 pi.clear_bank_1(1<<GPIO)
570 CHECK(8, 3, v, 0, 0,
"clear bank 1")
572 pi.set_bank_1(1<<GPIO)
574 CHECK(8, 4, v, 1, 0,
"set bank 1")
583 CHECK(8, 5, v, 0, 0,
"read bank 2")
585 v = pi.clear_bank_2(0)
586 CHECK(8, 6, v, 0, 0,
"clear bank 2")
588 pigpio.exceptions =
False 589 v = pi.clear_bank_2(0xffffff)
590 pigpio.exceptions =
True 591 CHECK(8, 7, v, pigpio.PI_SOME_PERMITTED, 0,
"clear bank 2")
594 CHECK(8, 8, v, 0, 0,
"set bank 2")
596 pigpio.exceptions =
False 597 v = pi.set_bank_2(0xffffff)
598 pigpio.exceptions =
True 599 CHECK(8, 9, v, pigpio.PI_SOME_PERMITTED, 0,
"set bank 2")
602 for check
in range(10):
604 e, p = pi.script_status(s)
605 if e != pigpio.PI_SCRIPT_HALTED:
609 print(
"Script store/run/status/stop/delete tests.")
626 t9cb = pi.callback(GPIO)
628 old_exceptions = pigpio.exceptions
630 pigpio.exceptions =
False 632 s = pi.store_script(script)
636 e, p = pi.script_status(s)
637 if e != pigpio.PI_SCRIPT_INITING:
642 pi.run_script(s, [99, GPIO])
647 e, p = pi.script_status(s)
648 if e != pigpio.PI_SCRIPT_RUNNING:
652 c = t9cb.tally() - oc
653 CHECK(9, 1, c, 100, 0,
"store/run script")
656 pi.run_script(s, [200, GPIO])
661 e, p = pi.script_status(s)
662 if e != pigpio.PI_SCRIPT_RUNNING:
666 c = t9cb.tally() - oc
667 CHECK(9, 2, c, 201, 0,
"run script/script status")
670 pi.run_script(s, [2000, GPIO])
675 e, p = pi.script_status(s)
676 if e != pigpio.PI_SCRIPT_RUNNING:
682 c = t9cb.tally() - oc
683 CHECK(9, 3, c, 110, 20,
"run/stop script/script status")
685 e = pi.delete_script(s)
686 CHECK(9, 4, e, 0, 0,
"delete script")
690 pigpio.exceptions = old_exceptions
693 print(
"Serial link tests.")
697 h = pi.serial_open(
"/dev/ttyAMA0", 57600)
698 CHECK(10, 1, h>=0, 1, 0,
"serial open")
700 (b, s) = pi.serial_read(h, 1000)
702 b = pi.serial_data_available(h)
703 CHECK(10, 2, b, 0, 0,
"serial data available")
706 To be, or not to be, that is the question- 707 Whether 'tis Nobler in the mind to suffer 708 The Slings and Arrows of outrageous Fortune, 709 Or to take Arms against a Sea of troubles, 711 e = pi.serial_write(h, TEXT)
712 CHECK(10, 3, e, 0, 0,
"serial write")
714 e = pi.serial_write_byte(h, 0xAA)
715 e = pi.serial_write_byte(h, 0x55)
716 e = pi.serial_write_byte(h, 0x00)
717 e = pi.serial_write_byte(h, 0xFF)
719 CHECK(10, 4, e, 0, 0,
"serial write byte")
723 b = pi.serial_data_available(h)
724 CHECK(10, 5, b, len(TEXT)+4, 0,
"serial data available")
726 (b, text) = pi.serial_read(h, len(TEXT))
727 CHECK(10, 6, b, len(TEXT), 0,
"serial read")
728 CHECK(10, 7,
STRCMP(text, TEXT),
True, 0,
"serial read")
730 b = pi.serial_read_byte(h)
731 CHECK(10, 8, b, 0xAA, 0,
"serial read byte")
733 b = pi.serial_read_byte(h)
734 CHECK(10, 9, b, 0x55, 0,
"serial read byte")
736 b = pi.serial_read_byte(h)
737 CHECK(10, 10, b, 0x00, 0,
"serial read byte")
739 b = pi.serial_read_byte(h)
740 CHECK(10, 11, b, 0xFF, 0,
"serial read byte")
742 b = pi.serial_data_available(h)
743 CHECK(10, 12, b, 0, 0,
"serial data available")
745 e = pi.serial_close(h)
746 CHECK(10, 13, e, 0, 0,
"serial close")
749 print(
"SMBus / I2C tests.")
753 h = pi.i2c_open(1, 0x53)
754 CHECK(11, 1, h>=0, 1, 0,
"i2c open")
756 e = pi.i2c_write_device(h,
"\x00")
757 CHECK(11, 2, e, 0, 0,
"i2c write device")
759 (b, d) = pi.i2c_read_device(h, 1)
760 CHECK(11, 3, b, 1, 0,
"i2c read device")
761 CHECK(11, 4, ord(d), 0xE5, 0,
"i2c read device")
763 b = pi.i2c_read_byte(h)
764 CHECK(11, 5, b, 0xE5, 0,
"i2c read byte")
766 b = pi.i2c_read_byte_data(h, 0)
767 CHECK(11, 6, b, 0xE5, 0,
"i2c read byte data")
769 b = pi.i2c_read_byte_data(h, 48)
770 CHECK(11, 7, b, 2, 0,
"i2c read byte data")
772 exp = b
"[aB\x08cD\xAAgHj\xFD]" 774 e = pi.i2c_write_device(h, b
'\x1D'+ exp)
775 CHECK(11, 8, e, 0, 0,
"i2c write device")
777 e = pi.i2c_write_device(h,
'\x1D')
778 (b, d) = pi.i2c_read_device(h, 12)
779 CHECK(11, 9, b, 12, 0,
"i2c read device")
780 CHECK(11, 10,
STRCMP(d, exp),
True, 0,
"i2c read device")
782 e = pi.i2c_write_byte_data(h, 0x1d, 0xAA)
783 CHECK(11, 11, e, 0, 0,
"i2c write byte data")
785 b = pi.i2c_read_byte_data(h, 0x1d)
786 CHECK(11, 12, b, 0xAA, 0,
"i2c read byte data")
788 e = pi.i2c_write_byte_data(h, 0x1d, 0x55)
789 CHECK(11, 13, e, 0, 0,
"i2c write byte data")
791 b = pi.i2c_read_byte_data(h, 0x1d)
792 CHECK(11, 14, b, 0x55, 0,
"i2c read byte data")
794 exp =
"[1234567890#]" 796 e = pi.i2c_write_block_data(h, 0x1C, exp)
797 CHECK(11, 15, e, 0, 0,
"i2c write block data")
799 e = pi.i2c_write_device(h,
'\x1D')
800 (b, d) = pi.i2c_read_device(h, 13)
801 CHECK(11, 16, b, 13, 0,
"i2c read device")
802 CHECK(11, 17,
STRCMP(d, exp),
True, 0,
"i2c read device")
804 (b, d) = pi.i2c_read_i2c_block_data(h, 0x1D, 13)
805 CHECK(11, 18, b, 13, 0,
"i2c read i2c block data")
806 CHECK(11, 19,
STRCMP(d, exp),
True, 0,
"i2c read i2c block data")
808 expl = [0x01, 0x05, 0x06, 0x07, 0x09, 0x1B, 0x99, 0xAA, 0xBB, 0xCC]
809 exp =
"\x01\x05\x06\x07\x09\x1B\x99\xAA\xBB\xCC" 811 e = pi.i2c_write_i2c_block_data(h, 0x1D, expl)
812 CHECK(11, 20, e, 0, 0,
"i2c write i2c block data")
814 (b, d) = pi.i2c_read_i2c_block_data(h, 0x1D, 10)
815 CHECK(11, 21, b, 10, 0,
"i2c read i2c block data")
816 CHECK(11, 22,
STRCMP(d, exp),
True, 0,
"i2c read i2c block data")
819 CHECK(11, 23, e, 0, 0,
"i2c close")
833 h = pi.spi_open(1, 50000)
834 CHECK(12, 1, h>=0, 1, 0,
"spi open")
836 (b, d) = pi.spi_xfer(h, [1,128,0])
837 CHECK(12, 2, b, 3, 0,
"spi xfer")
840 (b, d) = pi.spi_xfer(h,
"\x01\x80\x00")
841 CHECK(12, 2, b, 3, 0,
"spi xfer")
844 (b, d) = pi.spi_xfer(h, b
"\x01\x80\x00")
845 CHECK(12, 2, b, 3, 0,
"spi xfer")
848 (b, d) = pi.spi_xfer(h,
'\x01\x80\x00')
849 CHECK(12, 2, b, 3, 0,
"spi xfer")
852 (b, d) = pi.spi_xfer(h, b
'\x01\x80\x00')
853 CHECK(12, 2, b, 3, 0,
"spi xfer")
857 CHECK(12, 99, e, 0, 0,
"spi close")
861 print(
"Wavechains & filter tests.")
863 tdcb = pi.callback(GPIO)
865 pi.set_mode(GPIO, pigpio.OUTPUT)
867 pi.write(GPIO, pigpio.LOW)
870 CHECK(13, 1, e, 0, 0,
"callback, set mode, wave clear")
881 e = pi.wave_add_generic(wf)
882 CHECK(13, 2, e, 6, 0,
"pulse, wave add generic")
884 wid = pi.wave_create()
887 255, 0, wid, 255, 1, 128, 0, 255, 2, 0, 8,
888 255, 0, wid, 255, 1, 0, 1, 255, 2, 0, 4,
889 255, 0, wid, 255, 1, 0, 2]
891 e = pi.set_glitch_filter(GPIO, 0)
892 CHECK(13, 3, e, 0, 0,
"clear glitch filter")
894 e = pi.set_noise_filter(GPIO, 0, 0)
895 CHECK(13, 4, e, 0, 0,
"clear noise filter")
898 e = pi.wave_chain(chain)
899 CHECK(13, 5, e, 0, 0,
"wave chain")
900 while pi.wave_tx_busy():
904 CHECK(13, 6, tally, 2688, 2,
"wave chain, tally")
906 pi.set_glitch_filter(GPIO, 80)
909 while pi.wave_tx_busy():
913 CHECK(13, 7, tally, 1792, 2,
"glitch filter, wave chain, tally")
915 pi.set_glitch_filter(GPIO, 120)
918 while pi.wave_tx_busy():
922 CHECK(13, 8, tally, 896, 2,
"glitch filter, wave chain, tally")
924 pi.set_glitch_filter(GPIO, 140)
927 while pi.wave_tx_busy():
931 CHECK(13, 9, tally, 0, 0,
"glitch filter, wave chain, tally")
933 pi.set_glitch_filter(GPIO, 0)
936 pi.set_noise_filter(GPIO, 1000, 150000)
938 while pi.wave_tx_busy():
942 CHECK(13, 10, tally, 1500, 2,
"noise filter, wave chain, tally")
945 pi.set_noise_filter(GPIO, 2000, 150000)
947 while pi.wave_tx_busy():
951 CHECK(13, 11, tally, 750, 2,
"noise filter, wave chain, tally")
954 pi.set_noise_filter(GPIO, 3000, 5000)
956 while pi.wave_tx_busy():
960 CHECK(13, 12, tally, 0, 2,
"noise filter, wave chain, tally")
962 pi.set_noise_filter(GPIO, 0, 0)
964 e = pi.wave_delete(wid)
965 CHECK(13, 13, e, 0, 0,
"wave delete")
969 if len(sys.argv) > 1:
971 for C
in sys.argv[1]:
977 tests =
"0123456789d" 982 print(
"Connected to pigpio daemon.")
984 if '0' in tests:
t0()
985 if '1' in tests:
t1()
986 if '2' in tests:
t2()
987 if '3' in tests:
t3()
988 if '4' in tests:
t4()
989 if '5' in tests:
t5()
990 if '6' in tests:
t6()
991 if '7' in tests:
t7()
992 if '8' in tests:
t8()
993 if '9' in tests:
t9()
994 if 'a' in tests:
ta()
995 if 'b' in tests:
tb()
996 if 'c' in tests:
tc()
997 if 'd' in tests:
td()
def t7cbf(gpio, level, tick)
def CHECK(t, st, got, expect, pc, desc)
def t3cbf(gpio, level, tick)
def t5cbf(gpio, level, tick)
def t2cbf(gpio, level, tick)
def t6cbf(gpio, level, tick)