这个MicroRuby现在只能打印Hello World,功能都还不完整,,成熟度距离micropython差的远
MicroPython可以把Python代码编译成机器码,速度和C几乎一样快,,
@micropython.viper
def speed_viper():
x = 0
for i in range(8000000):
x += 2
甚至可以直接嵌入汇编:
@micropython.asm_thumb
def led_on():
movwt(r0, stm.GPIOA)
movw(r1, 1 << 13)
strh(r1, [r0, stm.GPIO_BSRRL])
写i2c时许肯定没问题,,
|