2014-03-12 21:06:26 -04:00
|
|
|
// qstrs specific to this port
|
|
|
|
|
|
|
|
Q(help)
|
|
|
|
Q(pyb)
|
|
|
|
Q(info)
|
|
|
|
Q(sd_test)
|
2014-03-26 16:15:40 -04:00
|
|
|
Q(present)
|
|
|
|
Q(power)
|
2014-04-13 20:45:24 -04:00
|
|
|
Q(wfi)
|
2014-03-12 21:06:26 -04:00
|
|
|
Q(stop)
|
|
|
|
Q(standby)
|
|
|
|
Q(source_dir)
|
|
|
|
Q(main)
|
2014-03-29 20:00:15 -04:00
|
|
|
Q(usb_mode)
|
2014-03-12 21:06:26 -04:00
|
|
|
Q(sync)
|
|
|
|
Q(gc)
|
|
|
|
Q(repl_info)
|
|
|
|
Q(delay)
|
|
|
|
Q(udelay)
|
|
|
|
Q(switch)
|
|
|
|
Q(SW)
|
|
|
|
Q(servo)
|
|
|
|
Q(pwm)
|
2014-03-26 16:15:40 -04:00
|
|
|
Q(read)
|
2014-04-03 13:32:54 -04:00
|
|
|
Q(readall)
|
|
|
|
Q(readline)
|
2014-03-26 16:15:40 -04:00
|
|
|
Q(write)
|
2014-03-12 21:06:26 -04:00
|
|
|
Q(hid)
|
|
|
|
Q(time)
|
2014-03-22 09:41:02 -04:00
|
|
|
Q(rng)
|
2014-03-12 21:06:26 -04:00
|
|
|
Q(LCD)
|
|
|
|
Q(SD)
|
|
|
|
Q(SDcard)
|
|
|
|
Q(gpio)
|
|
|
|
Q(gpio_in)
|
|
|
|
Q(gpio_out)
|
2014-04-07 21:08:16 -04:00
|
|
|
Q(FileIO)
|
2014-03-12 21:06:26 -04:00
|
|
|
// Entries for sys.path
|
|
|
|
Q(0:/)
|
|
|
|
Q(0:/src)
|
|
|
|
Q(0:/lib)
|
|
|
|
Q(Pin)
|
|
|
|
Q(PinMap)
|
|
|
|
Q(PinAF)
|
|
|
|
Q(PinNamed)
|
|
|
|
Q(rtc_info)
|
|
|
|
Q(millis)
|
|
|
|
Q(PULL_NONE)
|
|
|
|
Q(PULL_UP)
|
|
|
|
Q(PULL_DOWN)
|
|
|
|
Q(PUSH_PULL)
|
|
|
|
Q(OPEN_DRAIN)
|
2014-03-22 10:56:32 -04:00
|
|
|
|
2014-03-26 16:15:40 -04:00
|
|
|
// for Led object
|
|
|
|
Q(Led)
|
|
|
|
Q(on)
|
|
|
|
Q(off)
|
|
|
|
Q(toggle)
|
|
|
|
Q(intensity)
|
|
|
|
|
|
|
|
// for Usart object
|
|
|
|
Q(Usart)
|
|
|
|
Q(status)
|
|
|
|
Q(recv_chr)
|
|
|
|
Q(send_chr)
|
|
|
|
Q(send)
|
|
|
|
|
|
|
|
// for exti object
|
|
|
|
Q(Exti)
|
|
|
|
Q(line)
|
|
|
|
Q(enable)
|
|
|
|
Q(disable)
|
|
|
|
Q(swint)
|
2014-03-26 18:35:55 -04:00
|
|
|
Q(regs)
|
|
|
|
Q(MODE_IRQ_RISING)
|
|
|
|
Q(MODE_IRQ_FALLING)
|
|
|
|
Q(MODE_IRQ_RISING_FALLING)
|
|
|
|
Q(MODE_EVT_RISING)
|
|
|
|
Q(MODE_EVT_FALLING)
|
|
|
|
Q(MODE_EVT_RISING_FALLING)
|
2014-03-26 16:15:40 -04:00
|
|
|
|
|
|
|
// for I2C object
|
|
|
|
Q(I2C)
|
|
|
|
Q(is_ready)
|
|
|
|
Q(mem_read)
|
|
|
|
Q(mem_write)
|
|
|
|
|
|
|
|
// for Accel object
|
|
|
|
Q(Accel)
|
|
|
|
Q(x)
|
|
|
|
Q(y)
|
|
|
|
Q(z)
|
|
|
|
Q(tilt)
|
|
|
|
Q(filtered_xyz)
|
|
|
|
|
|
|
|
// for ADC object
|
|
|
|
Q(ADC)
|
|
|
|
Q(ADC_all)
|
|
|
|
Q(read_channel)
|
|
|
|
Q(read_core_temp)
|
|
|
|
Q(read_core_vbat)
|
|
|
|
Q(read_core_vref)
|
|
|
|
|
|
|
|
// for DAC object
|
|
|
|
Q(DAC)
|
|
|
|
Q(noise)
|
|
|
|
Q(triangle)
|
|
|
|
Q(dma)
|
|
|
|
|
|
|
|
// for Servo object
|
|
|
|
Q(Servo)
|
2014-04-08 19:45:45 -04:00
|
|
|
Q(pulse_width)
|
|
|
|
Q(calibrate)
|
2014-03-26 16:15:40 -04:00
|
|
|
Q(angle)
|
2014-04-08 19:45:45 -04:00
|
|
|
Q(speed)
|
2014-03-26 16:15:40 -04:00
|
|
|
|
2014-03-22 10:56:32 -04:00
|
|
|
// for os module
|
|
|
|
Q(os)
|
|
|
|
Q(/)
|
|
|
|
Q(listdir)
|
|
|
|
Q(mkdir)
|
|
|
|
Q(remove)
|
|
|
|
Q(rmdir)
|
|
|
|
Q(unlink)
|
|
|
|
Q(sep)
|
|
|
|
Q(urandom)
|
2014-03-22 11:06:29 -04:00
|
|
|
|
|
|
|
// for time module
|
|
|
|
Q(time)
|
|
|
|
Q(sleep)
|
2014-03-22 19:53:50 -04:00
|
|
|
|
|
|
|
// for input
|
|
|
|
Q(input)
|
stmhal: Add stm module, which contains some constants for the MCU.
Also contains raw memory read/write functions, read8, read16, read32,
write8, write16, write32. Can now do:
stm.write16(stm.GPIOA + stm.GPIO_BSRRL, 1 << 13)
This turns on the red LED.
With the new constant folding, the above constants for the GPIO address
are actually compiled to constants (and the addition done) at compile
time. For viper code and inline assembler, this optimisation will make
a big difference. In the inline assembler, using these constants would
not be possible without this constant folding.
2014-04-10 17:46:40 -04:00
|
|
|
|
|
|
|
// for stm module
|
|
|
|
Q(stm)
|
|
|
|
Q(read8)
|
|
|
|
Q(read16)
|
|
|
|
Q(read32)
|
|
|
|
Q(write8)
|
|
|
|
Q(write16)
|
|
|
|
Q(write32)
|
|
|
|
Q(GPIOA)
|
|
|
|
Q(GPIOB)
|
|
|
|
Q(GPIOC)
|
|
|
|
Q(GPIOD)
|
|
|
|
Q(GPIO_IDR)
|
|
|
|
Q(GPIO_BSRRL)
|
|
|
|
Q(GPIO_BSRRH)
|