/AliOS-Things-master/components/py_engine/tests/pyb/ |
A D | pyb1.py | 3 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 D | i2c_error.py | 3 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 D | irq.py | 1 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 D | timer_callback.py | 3 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 D | led.py | 1 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 D | dac.py | 1 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 D | board_pybv1x.py | 3 import os, pyb 12 pyb.UART(bus, 9600) 20 pyb.SPI(bus) 28 pyb.I2C(bus) 36 pyb.CAN(bus, pyb.CAN.LOOPBACK)
|
A D | pyb_f405.py | 3 import os, pyb 9 print(pyb.freq()) 10 print(type(pyb.rng())) 13 i2c = pyb.I2C(2, pyb.I2C.MASTER)
|
A D | extint.py | 1 import pyb 4 ext = pyb.ExtInt("X5", pyb.ExtInt.IRQ_RISING, pyb.Pin.PULL_DOWN, lambda l: print("line:", l))
|
A D | i2c_accel.py | 3 import pyb 4 from pyb import I2C 6 if not hasattr(pyb, "Accel"): 12 pyb.Accel() # this will init the MMA for us
|
A D | accel.py | 1 import pyb 3 if not hasattr(pyb, "Accel"): 7 accel = pyb.Accel()
|
A D | rtc.py | 1 import pyb, stm 2 from pyb import RTC 10 pyb.delay(1002)
|
A D | pyb_f411.py | 3 import os, pyb 9 print(pyb.freq())
|
A D | i2c.py | 1 import pyb 2 from pyb import I2C
|
A D | modstm.py | 4 import pyb 10 pyb.delay(100)
|
A D | timer.py | 3 import pyb 4 from pyb import Timer
|
A D | can.py | 2 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 D | main.py | 209 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 D | run-internalbench.py | 22 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 D | run-tests | 74 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 D | run-natmodtests.py | 79 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 D | run-multitests.py | 165 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 D | haasboard.py | 571 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 D | pyboard.py | 542 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 D | while.py | 1 import pyb 11 pyb.delay(d) 16 f(pyb.LED(1), 2, 150) 17 f(pyb.LED(2), 4, 50)
|