Home
last modified time | relevance | path

Searched refs:pyb (Results 1 – 25 of 34) sorted by relevance

12

/AliOS-Things-master/components/py_engine/tests/pyb/
A Dpyb1.py3 import pyb
7 pyb.delay(-1)
8 pyb.delay(0)
9 pyb.delay(1)
12 pyb.delay(17)
17 pyb.udelay(-1)
18 pyb.udelay(0)
19 pyb.udelay(1)
28 pyb.enable_irq()
32 pyb.sync()
[all …]
A Di2c_error.py3 import pyb
4 from pyb import I2C
11 pyb.Accel()
17 pyb.disable_irq()
19 pyb.enable_irq()
21 pyb.disable_irq()
24 pyb.enable_irq()
29 pyb.disable_irq()
31 pyb.enable_irq()
33 pyb.disable_irq()
[all …]
A Dirq.py1 import pyb
6 i1 = pyb.disable_irq()
8 pyb.enable_irq() # by default should enable IRQ
11 pyb.delay(10)
14 i1 = pyb.disable_irq()
15 i2 = pyb.disable_irq()
17 pyb.enable_irq(i2)
18 pyb.enable_irq(i1)
21 pyb.delay(10)
A Dtimer_callback.py3 import pyb
4 from pyb import Timer
31 pyb.delay(5)
33 pyb.delay(15)
37 pyb.delay(5)
39 pyb.delay(15)
45 pyb.delay(5)
47 pyb.delay(15)
52 pyb.delay(5)
54 pyb.delay(15)
A Dled.py1 import os, pyb
5 leds = [pyb.LED(i) for i in range(1, 5)]
8 leds = [pyb.LED(i) for i in range(1, 4)]
22 pyb.delay(100)
25 pyb.delay(100)
31 pyb.delay(100)
38 pyb.delay(1)
42 pyb.delay(1)
A Ddac.py1 import pyb
3 if not hasattr(pyb, "DAC"):
7 dac = pyb.DAC(1)
12 dac.write_timed(bytearray(10), 100, mode=pyb.DAC.NORMAL)
13 pyb.delay(20)
17 dac = pyb.DAC(1, buffering=True)
A Dboard_pybv1x.py3 import os, pyb
12 pyb.UART(bus, 9600)
20 pyb.SPI(bus)
28 pyb.I2C(bus)
36 pyb.CAN(bus, pyb.CAN.LOOPBACK)
A Dpyb_f405.py3 import os, pyb
9 print(pyb.freq())
10 print(type(pyb.rng()))
13 i2c = pyb.I2C(2, pyb.I2C.MASTER)
A Dextint.py1 import pyb
4 ext = pyb.ExtInt("X5", pyb.ExtInt.IRQ_RISING, pyb.Pin.PULL_DOWN, lambda l: print("line:", l))
A Di2c_accel.py3 import pyb
4 from pyb import I2C
6 if not hasattr(pyb, "Accel"):
12 pyb.Accel() # this will init the MMA for us
A Daccel.py1 import pyb
3 if not hasattr(pyb, "Accel"):
7 accel = pyb.Accel()
A Drtc.py1 import pyb, stm
2 from pyb import RTC
10 pyb.delay(1002)
A Dpyb_f411.py3 import os, pyb
9 print(pyb.freq())
A Di2c.py1 import pyb
2 from pyb import I2C
A Dmodstm.py4 import pyb
10 pyb.delay(100)
A Dtimer.py3 import pyb
4 from pyb import Timer
A Dcan.py2 from pyb import CAN
9 import pyb
160 can.setfilter(0, pyb.CAN.MASK32, 0, (filter_id, filter_mask))
275 pyb.delay(500)
301 can = pyb.CAN(1, pyb.CAN.NORMAL)
/AliOS-Things-master/components/py_engine/engine/tools/mpremote/mpremote/
A Dmain.py209 def do_disconnect(pyb): argument
211 if pyb.mounted:
215 if pyb.in_raw_repl:
222 pyb.close()
300 def do_repl(pyb, args): argument
339 pyb,
373 pyb = None
409 if pyb is None:
423 pyb = None
454 if pyb is None:
[all …]
/AliOS-Things-master/components/py_engine/tests/
A Drun-internalbench.py22 def run_tests(pyb, test_dict): argument
31 if pyb is None:
41 pyb.enter_raw_repl()
43 output_mupy = pyb.execfile(test_file).replace(b"\r\n", b"\n")
74 pyb = pyboard.Pyboard("/dev/ttyACM0")
75 pyb.enter_raw_repl()
77 pyb = None
80 if pyb is None:
102 if not run_tests(pyb, test_dict):
A Drun-tests74 if pyb is None:
168 pyb.enter_raw_repl()
178 pyb.enter_raw_repl()
244 def run_tests(pyb, tests, args, result_dir): argument
649 pyb = None
656 pyb.enter_raw_repl()
662 pyb.enter_raw_repl()
702 if pyb:
703 pyb.exit_raw_repl()
704 pyb.exit_python_mode()
[all …]
A Drun-natmodtests.py79 def __init__(self, pyb): argument
80 self.pyb = pyb
81 self.pyb.enter_raw_repl()
84 self.pyb.exit_raw_repl()
85 self.pyb.close()
89 self.pyb.enter_raw_repl()
90 output = self.pyb.exec_(script)
A Drun-multitests.py165 self.pyb = pyboard.Pyboard(device)
166 self.pyb.enter_raw_repl()
173 self.pyb.exit_raw_repl()
174 self.pyb.close()
180 self.pyb.enter_raw_repl()
181 output = self.pyb.exec_(script)
187 self.pyb.enter_raw_repl()
188 self.pyb.exec_raw_no_follow(script)
192 self.pyb.serial.write(b"\r\x03")
197 if self.pyb.serial.inWaiting() == 0:
[all …]
/AliOS-Things-master/components/py_engine/engine/tools/
A Dhaasboard.py571 pyb.enter_raw_repl()
574 pyb.exit_raw_repl()
575 pyb.exit_python_mode()
576 pyb.close()
629 pyb.exit_raw_repl()
630 pyb.close()
720 pyb.close()
734 pyb.close()
740 pyb.close()
775 pyb.close()
[all …]
A Dpyboard.py542 pyb.enter_raw_repl()
545 pyb.exit_raw_repl()
546 pyb.close()
599 pyb.exit_raw_repl()
600 pyb.close()
706 pyb = Pyboard(
721 pyb.close()
735 pyb.close()
741 pyb.close()
776 pyb.close()
[all …]
/AliOS-Things-master/components/py_engine/tests/pybnative/
A Dwhile.py1 import pyb
11 pyb.delay(d)
16 f(pyb.LED(1), 2, 150)
17 f(pyb.LED(2), 4, 50)

Completed in 50 milliseconds

12